Example #1
0
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
Example #2
0
    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)
Example #3
0
    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)
Example #4
0
    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)
Example #5
0
 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())
Example #6
0
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
Example #7
0
 def __repr__(self):
     from util import funcinfo
     return '<%s: [%s]>' % (type(self).__name__, ', '.join(
         funcinfo(f) for f in self))
Example #8
0
 def __repr__(self):
     from util import funcinfo
     return '<%s: [%s]>' % (type(self).__name__, ', '.join(funcinfo(f) for f in self))
Example #9
0
 def __repr__(self):
     from util import funcinfo
     return '<%s (from %s), callable is %s>' % (self.__class__.__name__, self.called_from, funcinfo(self._func))
Example #10
0
 def __repr__(self):
     from util import funcinfo
     return '<%s (from %s), callable is %s>' % (
         self.__class__.__name__, self.called_from, funcinfo(self._func))