944,175 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 362
  • Python RSS
Nov 5th, 2009
0

OS X default save path

Expand Post »
For whatever reason, Python on OS X sets the default file directory to the "~/Documents/ " folder. It's a bit annoying because it makes my documents folder massively cluttered with python files as well as files from my computer.

I'd like to change it simply by adding a "Python" folder within the documents folder, and then changing line 8 in idlemain.py to : os.chdir(os.path.expanduser('~/Documents/Python/'))

However, I keep getting an "[Errno 13] Permission Denied: '/Applications/Python 2.6/IDLE.app/Contents/Resources/idlemain.py' " whenever I attempt to save the file.

I'm logged in as Admin on my comp and I've tried changed the file in TextEdit with IDLE closed resulting in the same error..... Any ideas?

Also, if anyone knows how to get the two-finger scroll to work in Python that would be extremely appreciated as well.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
math743 is offline Offline
1 posts
since Nov 2009
Nov 6th, 2009
0
Re: OS X default save path
I don't know OS X, but couldn't you run idle with the -s option and write a startup file, say startup.py containing os.chdir(os.path.expanduser('~/Documents/Python/')), and then set the IDLESTARTUP environment variable to startup.py ?
Reputation Points: 930
Solved Threads: 668
Posting Maven
Gribouillis is online now Online
2,656 posts
since Jul 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Number 1 most possible frustrating situation
Next Thread in Python Forum Timeline: passing double char pointer to C function





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC