#NEWLINE# def show_verb_dictionary( filename = '' ) : #NEWLINE# #INDENT# if ( len ( filename ) > 0 ) : #NEWLINE# #INDENT# fout = open ( filename , 'w' ) #NEWLINE# fout . write ( 'PETRARCH Verb Dictionary Internal Format\n' ) #NEWLINE# fout . write ( ( ( 'Run time: ' + PETRglobals . RunTimeString ) + '\n' ) ) #NEWLINE# for ( locword , loclist ) in PETRglobals . VerbDict . items ( ) : #NEWLINE# #INDENT# if ( locword [ 0 ] == '&' ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# fout . write ( locword ) #NEWLINE# if loclist [ 0 ] : #NEWLINE# #INDENT# if ( len ( loclist ) > 1 ) : #NEWLINE# #INDENT# fout . write ( ( ( '::\n' + str ( loclist [ 1 : ] ) ) + '\n' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# fout . write ( ( ( ':: ' + str ( loclist [ 1 ] ) ) + '\n' ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# fout . write ( ( ( ( ( '-> ' + str ( loclist [ 2 ] ) ) + ' [' ) + loclist [ 1 ] ) + ']\n' ) ) #NEWLINE# #UNINDENT# #UNINDENT# fout . close ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# for ( locword , loclist ) in PETRglobals . VerbDict . items ( ) : #NEWLINE# #INDENT# print ( locword , end = ' ' ) #NEWLINE# if loclist [ 0 ] : #NEWLINE# #INDENT# if ( len ( loclist ) > 2 ) : #NEWLINE# #INDENT# print ( '::\n' , loclist [ 1 : ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( ':: ' , loclist [ 1 ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# print ( '-> ' , loclist [ 2 ] , ( ( '[' + loclist [ 1 ] ) + ']' ) )