print '''
Basic Python Introspection
''' def printKeys(name, obj): keys = obj.keys() keys.sort() print '
%s = %s' % (name, ', '.join(keys)) printKeys('globals', globals()) printKeys('locals', locals()) printKeys('environ', environ) printKeys('fields', fields) printKeys('headers', headers) printKeys('wrapper.__dict__', wrapper.__dict__) print '''
Note that the Error script results in a much better display of introspection. '''