예제 #1
0
파일: debugger.py 프로젝트: cxanes/vimfiles
 def cmd_dumprepr(self, *args):
     """Print debugging information on netbeans and the debugger."""
     unused = args
     self.console_print(
             'netbeans:\n%s\n' % misc.pformat(self.__nbsock.__dict__)
             + '%s:\n%s\n' % (self.__class__.__name__.lower(), self))
     self.print_prompt()
예제 #2
0
 def __str__(self):
     """Return the string representation."""
     shallow = copy.copy(self.__dict__)
     for name in list(shallow):
         if name in ('cmds', 'pyclewn_cmds', 'mapkeys'):
             del shallow[name]
     return misc.pformat(shallow)
예제 #3
0
파일: debugger.py 프로젝트: cxanes/vimfiles
 def __str__(self):
     """Return the string representation."""
     shallow = copy.copy(self.__dict__)
     for name in ('cmds', 'pyclewn_cmds', 'mapkeys'):
         if shallow.has_key(name):
             del shallow[name]
     return misc.pformat(shallow)
예제 #4
0
 def cmd_dumprepr(self, *args):
     """Print debugging information on netbeans and the debugger."""
     unused = args
     self.console_print('netbeans:\n%s\n' %
                        misc.pformat(self.__nbsock.__dict__) + '%s:\n%s\n' %
                        (self.__class__.__name__.lower(), self))
     self.print_prompt()
예제 #5
0
파일: debugger.py 프로젝트: lamlee/VimLite
 def __str__(self):
     """Return the string representation."""
     shallow = copy.copy(self.__dict__)
     for name in ("cmds", "pyclewn_cmds", "mapkeys"):
         if name in shallow:
             del shallow[name]
     return misc.pformat(shallow)
예제 #6
0
 def cmd_dumprepr(self, cmd, args):
     """Print debugging information on netbeans and the debugger."""
     unused = cmd
     # dumprepr is used by the testsuite to detect the end of
     # processing by pyclewn of all commands, so as to parse the
     # results and check the test
     if not (self.testrun and args):
         self.console_print(
                 'netbeans:\n%s\n' % misc.pformat(self.__nbsock.__dict__)
                 + '%s:\n%s\n' % (self.__class__.__name__.lower(), self))
         self.print_prompt()
예제 #7
0
 def __str__(self):
     """Return the string representation."""
     shallow = copy.copy(self.__dict__)
     for name in list(shallow):
         if name in ('cmds', 'pyclewn_cmds', 'mapkeys'):
             del shallow[name]
         # avoid "RuntimeError: dictionary changed size during
         # iteration" on socket_map when running pdb
         else:
             item = shallow[name]
             if isinstance(item, dict):
                 item = dict(item)
     return misc.pformat(shallow)
예제 #8
0
def pformat(name, obj):
    """Pretty format an object __dict__."""
    if obj:
        return '%s:\n%s\n' % (name, misc.pformat(obj.__dict__))
    else: return ''
예제 #9
0
 def __repr__(self):
     """Return the pretty formated self dictionary."""
     return misc.pformat(self.__dict__)
예제 #10
0
def pformat(name, obj):
    """Pretty format an object __dict__."""
    if obj:
        return '%s:\n%s\n' % (name, misc.pformat(obj.__dict__))
    else:
        return ''