#NEWLINE# def _mouseDown( x , y , button ) : #NEWLINE# #INDENT# if ( button == 'left' ) : #NEWLINE# #INDENT# _sendMouseEvent ( Quartz . kCGEventLeftMouseDown , x , y , Quartz . kCGMouseButtonLeft ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( button == 'middle' ) : #NEWLINE# #INDENT# _sendMouseEvent ( Quartz . kCGEventOtherMouseDown , x , y , Quartz . kCGMouseButtonCenter ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( button == 'right' ) : #NEWLINE# #INDENT# _sendMouseEvent ( Quartz . kCGEventRightMouseDown , x , y , Quartz . kCGMouseButtonRight ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert False , "button argument not in ('left', 'middle', 'right')"