Author: bugman Date: Wed Sep 14 18:20:36 2011 New Revision: 14636 URL: http://svn.gna.org/viewcvs/relax?rev=14636&view=rev Log: Better support for running a script and the GUI from the command line. The script is now run at the very end, after all of the GUI is set up, and is run with a wx.CallAfter call. Modified: 1.3/gui/relax_gui.py Modified: 1.3/gui/relax_gui.py URL: http://svn.gna.org/viewcvs/relax/1.3/gui/relax_gui.py?rev=14636&r1=14635&r2=14636&view=diff ============================================================================== --- 1.3/gui/relax_gui.py (original) +++ 1.3/gui/relax_gui.py Wed Sep 14 18:20:36 2011 @@ -148,13 +148,13 @@ # Initialise the special interpreter thread object. self.interpreter = Interpreter() - # Run a script. - if script: - self.user_functions.script.script_exec(script) - # Register functions with the observer objects. status.observers.pipe_alteration.register('status bar', self.update_status_bar) status.observers.result_file.register('gui', self.show_results_viewer_no_warn) + + # Run a script. + if script: + wx.CallAfter(self.user_functions.script.script_exec, script) def about_gui(self, event):