#NEWLINE# def module_to_dict( module , omittable = ( lambda k : k . startswith ( '_' ) ) ) : #NEWLINE# #INDENT# 'Converts a module namespace to a Python dictionary.' #NEWLINE# return dict ( ( ( k , repr ( v ) ) for ( k , v ) in module . __dict__ . items ( ) if ( not omittable ( k ) ) ) )