Example #1
0
	def load_config_file( self, event=None ):
		s_current_value=self.__config_file.get()
		s_config_file=tkfd.askopenfilename(  \
				title='Load a configuration file' )

		if pgut.dialog_returns_nothing( s_config_file ):
			return
		#end if no file selected, return

		self.__config_file.set(s_config_file)
		try:
			self.__setup_input()
		except Exception as oe:
			if s_config_file != INIT_ENTRY_CONFIG_FILE: 
				s_msg="Problem loading configuration.\n" \
						+ "File: " + str( s_config_file ) + "\n\n" \
						+ "Details:\n\n" \
						+ "Exception: " + str( oe ) + "."
				o_diag=PGGUIInfoMessage( self, s_msg )
			#end if entry not None
			return
		#end try ... except
		self.__init_interface()
		self.__load_values_into_interface()
		self.__set_controls_by_run_state( self.__get_run_state() )
		return
Example #2
0
	def select_output_directory( self, event=None ):

		s_outputdir=tkfd.askdirectory( \
				title='Select a directory for file output' )
		
		if pgut.dialog_returns_nothing( s_outputdir ):
			return
		#end if no directory selected, return

		self.__output_directory.set( s_outputdir )
		self.__init_interface()
		self.__set_controls_by_run_state( self.__get_run_state() )
		return