Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py2app changes current working directory #2

Closed
ChrisBeaumont opened this issue Sep 12, 2012 · 3 comments
Closed

py2app changes current working directory #2

ChrisBeaumont opened this issue Sep 12, 2012 · 3 comments

Comments

@ChrisBeaumont
Copy link
Member

Both glueqt and Glue.app will execute any python script passed as an argument. However, they run from a different working directory:

cwd.py:

import os
print "Current directory: ', os.getcwd()

glueqt:

beaumont@beaumont-2:~$ glueqt ~/cwd.py
Current directory:  /Users/beaumont

Glue.app

beaumont@beaumont-2:~$ /Applications/Glue.app/Contents/MacOS/Glue ~/cwd.py
Current directory:  /Applications/Glue.app/Contents/Resources

Because of this, the full path to any script passed to Glue.app must be provided:

beaumont@beaumont-2:~$ /Applications/Glue.app/Contents/MacOS/Glue cwd.py
CRITICAL:   File "/Applications/Glue.app/Contents/Resources/__boot__.py", line 39, in <module>
<trimmed>
Error: [Errno 2] No such file or directory: 'cwd.py'
2012-09-12 15:59:23.614 Glue[95094:707] Glue Error

Does py2app provide a way around this? If not, we can figure out a hack to put in Glue

@ChrisBeaumont
Copy link
Member Author

I just tried a 'hello world' app with py2app. Indeed, the --no-chdir option seems to address this issue.

astrofrog added a commit that referenced this issue Sep 18, 2012
@astrofrog
Copy link
Member

I added the option to the py2app call - can you check if the latest build works as expected?

@ChrisBeaumont
Copy link
Member Author

yes, this works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants