Changeset 278 for trunk/console.py


Ignore:
Timestamp:
07/28/09 06:58:46 (3 years ago)
Author:
marc
Message:

Dir and type methods for debugging, fixed config print method, added logtimeformat and time prefix to log, fixed a bug when restarting the server on another port, better docs for twisted ports, bigger itaka notify icon but ubuntu osd still fails, less verbose sigint, minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/console.py

    r277 r278  
    6666    print_message('DEBUG: %s' % (" - ".join(str(item) for item in strings))) 
    6767 
     68def print_type(*strings): 
     69    """ 
     70    Print type wrapper. 
     71 
     72    @type *strings: anything 
     73    @param *strings: Anything 
     74    """ 
     75 
     76    print_message('DEBUG: %s' % (" - ".join(str(type(item)) for item in strings))) 
     77 
     78def print_dir(*strings): 
     79    """ 
     80    Print dir wrapper. 
     81 
     82    @type *strings: anything 
     83    @param *strings: Anything 
     84    """ 
     85 
     86    print_message('DEBUG: %s' % (" - ".join(str(dir(item)) for item in strings))) 
     87 
    6888# Register them for global use 
    6989__builtin__.print_m = print_message 
     
    7191__builtin__.print_w = print_warning 
    7292__builtin__.print_d = print_debug 
     93__builtin__.print_t = print_type 
     94__builtin__.print_dir = print_dir 
    7395 
    7496class BaseMessage: 
Note: See TracChangeset for help on using the changeset viewer.