This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: PythonLauncher uses incorrect working directory
Type: Stage:
Components: macOS Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ronaldoussoren Nosy List: bob.ippolito, ronaldoussoren, sf-robot
Priority: high Keywords:

Created on 2006-07-23 17:29 by bob.ippolito, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python-launcher-cwd.diff ronaldoussoren, 2006-07-23 18:50
Messages (4)
msg29256 - (view) Author: Bob Ippolito (bob.ippolito) * (Python committer) Date: 2006-07-23 17:29
PythonLauncher, the application used to launch .py files by double-click, 
does not launch with the correct working directory. This means that any 
script that depends on data files will not work via PythonLauncher.

Users expect the working directory to be that of the launched script, like 
on other platforms, but PythonLauncher launches with a working directory 
of $HOME.
msg29257 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2006-07-23 18:50
Logged In: YES 
user_id=580910

I agree that the current behaviour is not what users expect and should be 
considered a bug.

I'd like to get the attached patch into 2.5, it changes the CWD to the directory 
containing the script and should be perfectly save.
msg29258 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2006-08-01 21:02
Logged In: YES 
user_id=580910

Fixed in revision 51028. Please confirm.

The same revision also fixes a problem where PythonLauncher failed to launch 
scripts if the name contains quotes (e.g. "Ronald's Script.py").
msg29259 - (view) Author: SourceForge Robot (sf-robot) Date: 2006-08-16 02:20
Logged In: YES 
user_id=1312539

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
History
Date User Action Args
2022-04-11 14:56:19adminsetgithub: 43709
2006-07-23 17:29:36bob.ippolitocreate