@@ -383,15 +383,14 @@ def handle_msg(self, msg):
383
383
elif evt ['widget' ] == 'winput' :
384
384
obj ._text = evt ['text' ]
385
385
obj ._number = evt ['value' ]
386
+
386
387
# 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
+
395
394
else : ## a canvas event
396
395
if 'trigger' not in evt :
397
396
cvs = baseObj .object_registry [evt ['canvas' ]]
@@ -3232,14 +3231,12 @@ def handle_event(self, evt): ## events and scene info updates
3232
3231
del evt ['height' ]
3233
3232
for fct in self ._binds ['resize' ]:
3234
3233
# 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
+
3243
3240
else : # pause/waitfor, update_canvas
3244
3241
if 'pos' in evt :
3245
3242
pos = evt ['pos' ]
@@ -3259,14 +3256,12 @@ def handle_event(self, evt): ## events and scene info updates
3259
3256
evt1 = event_return (evt ) ## turn it into an object
3260
3257
for fct in self ._binds [ev ]:
3261
3258
# 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
+
3270
3265
self ._waitfor = evt1 # what pause and waitfor are looking for
3271
3266
else : ## user can change forward (spin), range/autoscale (zoom), up (touch), center (pan)
3272
3267
if 'forward' in evt and self .userspin and not self ._set_forward :
0 commit comments