#NEWLINE# def loadFile( self , filename ) : #NEWLINE# #INDENT# self . filename = filename #NEWLINE# self . listBox . delete ( 0 , END ) #NEWLINE# self . dirty = False #NEWLINE# try : #NEWLINE# #INDENT# with open ( self . filename , 'rb' ) as fh : #NEWLINE# #INDENT# self . data = pickle . load ( fh ) #NEWLINE# #UNINDENT# for name in sorted ( self . data , key = str . lower ) : #NEWLINE# #INDENT# self . listBox . insert ( END , name ) #NEWLINE# #UNINDENT# self . showStatus ( _ ( 'Loaded {0} items from {1}' ) . format ( self . listbox . size ( ) , self . filename ) , clearAfter = 5000 ) #NEWLINE# self . parent . title ( _ ( 'arelle - {0}' ) . format ( os . path . basename ( self . filename ) ) ) #NEWLINE# #UNINDENT# except ( EnvironmentError , pickle . PickleError ) as err : #NEWLINE# #INDENT# tkinter . messagebox . showwarning ( _ ( 'arelle - Error' ) , _ ( 'Failed to load {0}\n{1}' ) . format ( self . filename , err ) , parent = self . parent )