trepan/lib/stack.py
def print_obj(arg, val, format=None, short=False):
    """Return a string representation of an object """
    what = arg
    if format:
        what = format + ' ' + arg
        val = Mprint.printf(val, format)
        pass
    s = '%s = %s' % (what, val)
    if not short:
        s += '\n  type = %s' % type(val)
        # Try to list the members of a class.
        # Not sure if this is correct or the
        # best way to do.
        s = print_dict(s, val, "object variables")
        if hasattr(val, "__class__"):
            s = print_dict(s, val.__class__, "class variables")
            pass
        pass
    return s
def print_obj(arg, val, format=None, short=False):
    """Return a string representation of an object """
    what = arg
    if format:
        what = format + ' ' + arg
        val = Mprint.printf(val, format)
        pass
    s = '%s = %s' % (what, val)
    if not short:
        s += '\n  type = %s' % type(val)
        # Try to list the members of a class.
        # Not sure if this is correct or the
        # best way to do.
        s = print_dict(s, val, "object variables")
        if hasattr(val, "__class__"):
            s = print_dict(s, val.__class__, "class variables")
            pass
        pass
    return s
def print_obj ( arg , val , format = None , short = False ) : what = arg if format : what = format + ' ' + arg val = Mprint . printf ( val , format ) pass s = '%s = %s' % ( what , val ) if not short : s += '\n  type = %s' % type ( val ) # Try to list the members of a class. # Not sure if this is correct or the # best way to do. s = print_dict ( s , val , "object variables" ) if hasattr ( val , "__class__" ) : s = print_dict ( s , val . __class__ , "class variables" ) pass pass return s
Return a string representation of an object
Return a string representation of an object