#NEWLINE# def info( obj = None ) : #NEWLINE# #INDENT# 'Print some helpful information about the given object. Usually the\n    docstring.  If no parameter given then provide some info on Python itself.' #NEWLINE# if ( obj is None ) : #NEWLINE# #INDENT# print ( 'Python keywords:' ) #NEWLINE# import keyword #NEWLINE# for kwname in keyword . kwlist : #NEWLINE# #INDENT# print ( '  ' , kwname ) #NEWLINE# #UNINDENT# print ( 'Built in objects:' ) #NEWLINE# for bi_object_name in sorted ( __builtins__ . keys ( ) ) : #NEWLINE# #INDENT# bi_object = __builtins__ [ bi_object_name ] #NEWLINE# if callable ( bi_object ) : #NEWLINE# #INDENT# if ( type ( bi_object ) is types . ClassType ) : #NEWLINE# #INDENT# print ( '  {} (class)' . format ( bi_object . __name__ ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( type ( bi_object ) is types . FunctionType ) : #NEWLINE# #INDENT# print ( '  {} (function)' . format ( bi_object . __name__ ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( hasattr ( obj , '__doc__' ) and ( obj . __doc__ is not None ) ) : #NEWLINE# #INDENT# print ( ( 'Documentation for %s :\n' % obj . __name__ ) ) #NEWLINE# print ( obj . __doc__ ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( type ( obj ) is types . ModuleType ) : #NEWLINE# #INDENT# pprint ( dir ( obj ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( type ( obj ) is types . ClassType ) : #NEWLINE# #INDENT# pprint ( dir ( obj ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( type ( obj ) is types . InstanceType ) : #NEWLINE# #INDENT# pprint ( dir ( obj ) ) #NEWLINE# pprint ( dir ( obj . __class__ ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return ''