| | |
OS X default save path
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Nov 2009
Posts: 1
Reputation:
Solved Threads: 0
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.
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.
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 ?
![]() |
Similar Threads
- JFrame Question (Java)
- help me set path (Java)
- Look At My Log, Please (Viruses, Spyware and other Nasties)
- Browser opening by itself. (Viruses, Spyware and other Nasties)
- isamonitor dll error trojan horse adware/spyware http://iehomepages.com/ (Viruses, Spyware and other Nasties)
- Changing default save as field in IE 6 ... (Windows NT / 2000 / XP)
- How to generate pdf file automatically at background? (HTML and CSS)
- Switching Storage Hard Drive issue (Windows NT / 2000 / XP)
- default save/bmp vs jpeg (Web Browsers)
Other Threads in the Python Forum
- Previous Thread: Number 1 most possible frustrating situation
- Next Thread: passing double char pointer to C function
| Thread Tools | Search this Thread |
Tag cloud for Python
abrupt ansi anti apache approximation array basic beginner book builtin calculator chmod code converter countpasswordentry curved dan08 dictionaries dictionary dynamic examples excel file filename float format ftp function gui heads homework import inches input java launcher library line lines linux list lists loop mouse mysql mysqlquery number numbers numeric output parsing path phonebook plugin port prime programming progressbar projects py2exe pygame pyqt pysimplewizard python random recursion recursive redirect refresh scrolledtext software ssh stamp statictext statistics string strings table terminal text textarea thread threading time tkinter tlapse trick tricks tuple tutorial twoup ubuntu unicode urllib urllib2 variable windows wordgame write wxpython





