Skip to content

Commit 8dd2bfc

Browse files
committed
cwd is automatically set to the folder of the application being launched when execute_py_file is called with cwd=None
1 parent c612ec6 commit 8dd2bfc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

PySimpleGUI.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/python3
22

3-
version = __version__ = "4.43.0.1 Unreleased\nChanged get_versions string to be more clear, removed canvas from return values"
3+
version = __version__ = "4.43.0.2 Unreleased\nChanged get_versions string to be more clear, removed canvas from return values, cwd is automatically set to the folder of the application being launched when execute_py_file is called with cwd=None"
44

55
__version__ = version.split()[0] # For PEP 396 and PEP 345
66

@@ -18383,7 +18383,8 @@ def execute_py_file(pyfile, parms=None, cwd=None, interpreter_command=None, wait
1838318383
:return: Popen object
1838418384
:rtype: (subprocess.Popen) | None
1838518385
"""
18386-
18386+
if cwd is None:
18387+
cwd = os.path.dirname(pyfile)
1838718388
if pyfile[0] != '"' and ' ' in pyfile:
1838818389
pyfile = '"'+pyfile+'"'
1838918390
if interpreter_command is not None:

0 commit comments

Comments
 (0)