#NEWLINE# def show_state( * arguments ) : #NEWLINE# #INDENT# 'Shows the contents of the state loaded by the configuration or from\n    the file specified as an argument.\n    ' #NEWLINE# if ( len ( arguments ) == 0 ) : #NEWLINE# #INDENT# state_file = conf [ 'pyexperiment.state_filename' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# state_file = err [ 0 ] #NEWLINE# #UNINDENT# print_bold ( "Load state from file '%s'" , state_file ) #NEWLINE# try : #NEWLINE# #INDENT# state . load ( state_file , lazy = False , raise_error = True ) #NEWLINE# #UNINDENT# except IOError as err : #NEWLINE# #INDENT# print ( err ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( state ) > 0 ) : #NEWLINE# #INDENT# state . show ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( 'State empty' )