def write_docstringdict(filename='turtle_docstringdict'):
 docsdict = {}
 for methodname in _tg_screen_functions:
  key = ('_Screen.' + methodname)
  docsdict[key] = eval(key).__doc__
 for methodname in _tg_turtle_functions:
  key = ('Turtle.' + methodname)
  docsdict[key] = eval(key).__doc__
 f = open(('%s.py' % filename), 'w')
 keys = sorted([x for x in docsdict.keys() if (x.split('.')[1] not in _alias_list)])
 f.write('docsdict = {\n\n')
 for key in keys[:(-1)]:
  f.write(('%s :\n' % repr(key)))
  f.write(('        """%s\n""",\n\n' % docsdict[key]))
 key = keys[(-1)]
 f.write(('%s :\n' % repr(key)))
 f.write(('        """%s\n"""\n\n' % docsdict[key]))
 f.write('}\n')
 f.close()

def write_docstringdict ( filename = 'turtle_docstringdict' ) : docsdict = { } for methodname in _tg_screen_functions : key = ( '_Screen.' + methodname ) docsdict [ key ] = eval ( key ) . __doc__ for methodname in _tg_turtle_functions : key = ( 'Turtle.' + methodname ) docsdict [ key ] = eval ( key ) . __doc__ f = open ( ( '%s.py' % filename ) , 'w' ) keys = sorted ( [ x for x in docsdict . keys ( ) if ( x . split ( '.' ) [ 1 ] not in _alias_list ) ] ) f . write ( 'docsdict = {\n\n' ) for key in keys [ : ( - 1 ) ] : f . write ( ( '%s :\n' % repr ( key ) ) ) f . write ( ( '        """%s\n""",\n\n' % docsdict [ key ] ) ) key = keys [ ( - 1 ) ] f . write ( ( '%s :\n' % repr ( key ) ) ) f . write ( ( '        """%s\n"""\n\n' % docsdict [ key ] ) ) f . write ( '}\n' ) f . close ( )
create and write docstring-dictionary to file .