def call_later_repr(self): from util import funcinfo fi = funcinfo(self.callable) if self.running: return '<CallLater (running) %s>' % fi else: return '<CallLater %s>' % fi
def showevents(e): from gui.uberwidgets.umenu import menuEventHandler from pprint import pprint from util import funcinfo for id, cb in menuEventHandler(f).cbs.iteritems(): print id, funcinfo(cb)
def try_connect(self, address, succ, fail, time_to_wait, provide_init): provide_init(self) self.real_success = succ self.fail = fail self.dead = False self.data = None #make new socket self.make_socket() self.timeoutvalid = True self.timeout = Timer(time_to_wait, self.handle_timeout) self.timeout.start() print '*'*40 from util import funcinfo print funcinfo(self.connect) print '*'*40 self.connect(address, error=self.do_fail)
def newinit(self, *a, **k): try: oldinit(self, *a, **k) except: # WXPYHACK from util import funcinfo import sys print >> sys.stderr, '_change_font failed at %s' % funcinfo(oldinit) raise self.SetFont(default_font())
def repritem(i): from util import funcinfo try: if type(i) in custom_reprs: return custom_reprs[type(i)](i) repr_txt = unicode(repr(i)).decode(enc, 'replace')[:300] if repr_txt.startswith('<function <lambda> at'): repr_txt = funcinfo(i) else: repr_txt = repr(i.__class__) + ': ' + repr_txt except Exception: # (UnicodeDecodeError, UnicodeEncodeError, wx.PyDeadObjectError): return '<%s at %x>' % (type(i).__name__, id(i)) return repr_txt
def __repr__(self): from util import funcinfo return '<%s: [%s]>' % (type(self).__name__, ', '.join( funcinfo(f) for f in self))
def __repr__(self): from util import funcinfo return '<%s: [%s]>' % (type(self).__name__, ', '.join(funcinfo(f) for f in self))
def __repr__(self): from util import funcinfo return '<%s (from %s), callable is %s>' % (self.__class__.__name__, self.called_from, funcinfo(self._func))
def __repr__(self): from util import funcinfo return '<%s (from %s), callable is %s>' % ( self.__class__.__name__, self.called_from, funcinfo(self._func))