| | |
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 31 Days Ago
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 |
alarm assignment avogadro beginner bluetooth character cmd code customdialog cx-freeze data decimals dictionary directory dynamic error examples exe file float format function generator gnu graphics gui halp homework http ideas import input itunes java leftmouse line linux list lists logging loop maintain maze module mouse mysqldb number numbers output parsing path port prime programming projects push py2exe pygame pyglet pyqt python queue random recursion schedule screensaverloopinactive script scrolledtext slicenotation sqlite ssh stdout string strings sudokusolver table terminal text thread threading time tkinter tlapse tuple tutorial ubuntu unicode urllib urllib2 variable variables ventrilo verify vigenere web webservice wikipedia windows wxpython xlib





