run HUD_main.exe if running fpdb.exe (created by py2exe)

This commit is contained in:
sqlcoder 2010-02-06 10:33:00 +00:00
parent 4a0fcd62a0
commit 4d74437845

View File

@ -194,6 +194,9 @@ class GuiAutoImport (threading.Thread):
widget.set_label(u' _Stop Autoimport ') widget.set_label(u' _Stop Autoimport ')
if self.pipe_to_hud is None: if self.pipe_to_hud is None:
if os.name == 'nt': if os.name == 'nt':
if sys.argv[0] == 'fpdb.exe':
command = 'HUD_main.exe'
else:
path = sys.path[0].replace('\\','\\\\') path = sys.path[0].replace('\\','\\\\')
command = 'python "'+path+'\\HUD_main.py" ' + self.settings['cl_options'] command = 'python "'+path+'\\HUD_main.py" ' + self.settings['cl_options']
bs = 0 bs = 0
@ -208,7 +211,8 @@ class GuiAutoImport (threading.Thread):
universal_newlines=True) universal_newlines=True)
except: except:
err = traceback.extract_tb(sys.exc_info()[2])[-1] 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: else:
for site in self.input_settings: for site in self.input_settings:
self.importer.addImportDirectory(self.input_settings[site][0], True, site, self.input_settings[site][1]) self.importer.addImportDirectory(self.input_settings[site][0], True, site, self.input_settings[site][1])