From 4d7443784577502ba9ac09abfc101f0b0a54f3e1 Mon Sep 17 00:00:00 2001 From: sqlcoder Date: Sat, 6 Feb 2010 10:33:00 +0000 Subject: [PATCH] run HUD_main.exe if running fpdb.exe (created by py2exe) --- pyfpdb/GuiAutoImport.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pyfpdb/GuiAutoImport.py b/pyfpdb/GuiAutoImport.py index 339ce968..192124e5 100755 --- a/pyfpdb/GuiAutoImport.py +++ b/pyfpdb/GuiAutoImport.py @@ -194,8 +194,11 @@ class GuiAutoImport (threading.Thread): widget.set_label(u' _Stop Autoimport ') if self.pipe_to_hud is None: if os.name == 'nt': - path = sys.path[0].replace('\\','\\\\') - command = 'python "'+path+'\\HUD_main.py" ' + self.settings['cl_options'] + if sys.argv[0] == 'fpdb.exe': + command = 'HUD_main.exe' + else: + path = sys.path[0].replace('\\','\\\\') + command = 'python "'+path+'\\HUD_main.py" ' + self.settings['cl_options'] bs = 0 else: command = os.path.join(sys.path[0], 'HUD_main.py') @@ -208,7 +211,8 @@ class GuiAutoImport (threading.Thread): universal_newlines=True) except: err = traceback.extract_tb(sys.exc_info()[2])[-1] - self.addText( "\n*** GuiAutoImport Error opening pipe: " + err[2] + "(" + str(err[1]) + "): " + str(sys.exc_info()[1])) + #self.addText( "\n*** GuiAutoImport Error opening pipe: " + err[2] + "(" + str(err[1]) + "): " + str(sys.exc_info()[1])) + self.addText( "\n*** GuiAutoImport Error opening pipe: " + traceback.format_exc() ) else: for site in self.input_settings: self.importer.addImportDirectory(self.input_settings[site][0], True, site, self.input_settings[site][1])