Replace subprocess.Popen with os.startfile on Windows.
This commit is contained in:
parent
f8e8e7ec07
commit
e209e3a4b9
1 changed files with 6 additions and 3 deletions
9
PGUI.pyw
9
PGUI.pyw
|
|
@ -123,10 +123,13 @@ class PGUILauncher(tkinter.Frame):
|
||||||
self.launch_program(self.ready_to_launch.shortcut)
|
self.launch_program(self.ready_to_launch.shortcut)
|
||||||
|
|
||||||
def launch_program(self, shortcut):
|
def launch_program(self, shortcut):
|
||||||
print('opening application', shortcut.basename)
|
print('opening shortcut', shortcut.basename)
|
||||||
os.chdir(shortcut.parent.absolute_path)
|
os.chdir(shortcut.parent.absolute_path)
|
||||||
command = f'"{shortcut.absolute_path}"'
|
if os.name == 'nt':
|
||||||
subprocess.Popen(command, shell=True)
|
os.startfile(shortcut.absolute_path)
|
||||||
|
else:
|
||||||
|
command = f'"{shortcut.absolute_path}"'
|
||||||
|
subprocess.Popen(command, shell=True)
|
||||||
self.quit()
|
self.quit()
|
||||||
|
|
||||||
def open_pgui_folder(self):
|
def open_pgui_folder(self):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue