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
5
PGUI.pyw
5
PGUI.pyw
|
|
@ -123,8 +123,11 @@ class PGUILauncher(tkinter.Frame):
|
|||
self.launch_program(self.ready_to_launch.shortcut)
|
||||
|
||||
def launch_program(self, shortcut):
|
||||
print('opening application', shortcut.basename)
|
||||
print('opening shortcut', shortcut.basename)
|
||||
os.chdir(shortcut.parent.absolute_path)
|
||||
if os.name == 'nt':
|
||||
os.startfile(shortcut.absolute_path)
|
||||
else:
|
||||
command = f'"{shortcut.absolute_path}"'
|
||||
subprocess.Popen(command, shell=True)
|
||||
self.quit()
|
||||
|
|
|
|||
Loading…
Reference in a new issue