OS X default save path

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Nov 2009
Posts: 1
Reputation: math743 is an unknown quantity at this point 
Solved Threads: 0
math743 math743 is offline Offline
Newbie Poster

OS X default save path

 
0
  #1
Nov 5th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 965
Reputation: Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough 
Solved Threads: 222
Gribouillis's Avatar
Gribouillis Gribouillis is offline Offline
Posting Shark
 
0
  #2
Nov 6th, 2009
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 ?
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the Python Forum
Thread Tools Search this Thread



Tag cloud for Python
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC