def talker(args=None): # Handle arguments parser = argparse.ArgumentParser() parser.add_argument( '-config', type=str, default='/home/nick/GitHub/4d-agriculture/main_datapath/config.ini', help='Path to config file') args = parser.parse_args() # Create config.ini if it doesn't already exist if not os.path.exists(args.config): config.create_config_global(args.config) config.verify_config(args.config) # Create a new configparser parser = configparser.ConfigParser(interpolation=None) parser.read(args.config) # Create publisher node pub = rospy.Publisher('sample_points', String, queue_size=10) rospy.init_node('sample_gui', anonymous=False) # Create gui master = tk.Tk() gui.Main(master, parser, pub) # Run gui master.mainloop()
def GetGUI(): global GUIsettings global maze_NumberOfTrials, maze_angleTolerance, maze_destinationDuration, maze_trialDuration, maze_timeToStart global minimum, maximum initGUI = gui.Main() GUIsettings = initGUI.get_settings() DegToRad = pi / 180 minimum = GUIsettings.get("maze_ITI_Min") #seconds maximum = GUIsettings.get("maze_ITI_Max") #seconds maze_NumberOfTrials = GUIsettings.get("maze_numberOfTrials") maze_angleTolerance = GUIsettings.get( "maze_angleTolerance") * DegToRad #convert degree to radian maze_destinationDuration = GUIsettings.get( "maze_destinationDuration") #seconds maze_trialDuration = GUIsettings.get("maze_trialDuration") #seconds maze_timeToStart = GUIsettings.get("maze_timeToStart") #seconds print("NOT", maze_NumberOfTrials) print("AT", maze_angleTolerance) print("DD", maze_destinationDuration) print("TD", maze_trialDuration) #rewardtimeout print("TTS", maze_timeToStart)
def run(self): application_name = window_stack.get() gui_objects = gui.Main() gui_objects.present_application_name.config(text=application_name) gui_objects.new_button.config( command=lambda application=application_name: gui_objects.add_new( application)) gui_objects.quit_button.config(command=self.stop) gui_objects.display_notes(application_name) while self.loop: gui_objects.main_window.update_idletasks() gui_objects.main_window.update() gui_objects.refresh() current_app = window_stack.get() if current_app != application_name: application_name = current_app gui_objects.present_application_name.config( text=application_name) gui_objects.new_button.config( command=lambda application=application_name: gui_objects. add_new(application)) for child in gui_objects.framefornote.winfo_children(): child.destroy() #gui_objects.framefornote.destroy() gui_objects.display_notes(application_name)
def GetGUI(): global GUIsettings global platform_stop_dist, platform_normalSpeed, platform_clear_dist, platform_slowDownSpeed initGUI = gui.Main() GUIsettings = initGUI.get_settings() platform_stop_dist = GUIsettings.get("platform_stop_dist") platform_clear_dist = GUIsettings.get("platform_clear_dist") platform_normalSpeed = GUIsettings.get("platform_normalSpeed") platform_slowDownSpeed = GUIsettings.get("platform_slowDownSpeed")
#Auteur --> aiglematth """ Fichier du code principal du programme """ #Imports import gui #Main root = gui.Main() root.mainloop()
def GetGUI(exp_info={}): global GUIsettings initGUI = gui.Main() GUIsettings = initGUI.get_settings()
def get_gui(): initGUI = gui.Main() settings = initGUI.get_settings() return settings
images.append(jpg) print(images) images[0].save(pdf, save_all=True) for image in images[1:]: image.save(pdf, append=image) return "Success", folder_path except Exception as e: return "Failed", e if __name__ == '__main__': window = gui.Main() while True: event, values = window.read() print(event, values) # if event is OK, on the navigation we are at the second level # if it is not OK, we are on the second level if event is not "Ok": option = event if event is None or event == 'Exit': break if event in ['Split', 'Merge', 'Word2PDF', 'PDF2Image', 'Image2PDF']: layout = gui.LayoutHandler()[event] elif event == "Ok": if option == "Split":