@@ -383,15 +383,14 @@ def handle_msg(self, msg):
383383 elif evt ['widget' ] == 'winput' :
384384 obj ._text = evt ['text' ]
385385 obj ._number = evt ['value' ]
386+
386387 # inspect the bound function and see what it's expecting
387- if _ispython3 : # Python 3
388- a = signature (obj ._bind )
389- if str (a ) != '()' : obj ._bind ( obj )
390- else : obj ._bind ()
391- else : # Python 2
392- a = getargspec (obj ._bind )
393- if len (a .args ) > 0 : obj ._bind ( obj )
394- else : obj ._bind ()
388+ a = signature (obj ._bind )
389+ if str (a ) != '()' :
390+ obj ._bind ( obj )
391+ else :
392+ obj ._bind ()
393+
395394 else : ## a canvas event
396395 if 'trigger' not in evt :
397396 cvs = baseObj .object_registry [evt ['canvas' ]]
@@ -3232,14 +3231,12 @@ def handle_event(self, evt): ## events and scene info updates
32323231 del evt ['height' ]
32333232 for fct in self ._binds ['resize' ]:
32343233 # inspect the bound function and see what it's expecting
3235- if _ispython3 : # Python 3
3236- a = signature (fct )
3237- if str (a ) != '()' : fct ( evt )
3238- else : fct ()
3239- else : # Python 2
3240- a = getargspec (fct )
3241- if len (a .args ) > 0 : fct ( evt )
3242- else : fct ()
3234+ a = signature (fct )
3235+ if str (a ) != '()' :
3236+ fct (evt )
3237+ else :
3238+ fct ()
3239+
32433240 else : # pause/waitfor, update_canvas
32443241 if 'pos' in evt :
32453242 pos = evt ['pos' ]
@@ -3259,14 +3256,12 @@ def handle_event(self, evt): ## events and scene info updates
32593256 evt1 = event_return (evt ) ## turn it into an object
32603257 for fct in self ._binds [ev ]:
32613258 # inspect the bound function and see what it's expecting
3262- if _ispython3 : # Python 3
3263- a = signature (fct )
3264- if str (a ) != '()' : fct ( evt1 )
3265- else : fct ()
3266- else : # Python 2
3267- a = getargspec (fct )
3268- if len (a .args ) > 0 : fct ( evt1 )
3269- else : fct ()
3259+ a = signature (fct )
3260+ if str (a ) != '()' :
3261+ fct ( evt1 )
3262+ else :
3263+ fct ()
3264+
32703265 self ._waitfor = evt1 # what pause and waitfor are looking for
32713266 else : ## user can change forward (spin), range/autoscale (zoom), up (touch), center (pan)
32723267 if 'forward' in evt and self .userspin and not self ._set_forward :
0 commit comments