Does anyone know where or how to set the default path/directory on saving python scripts prior to running?
On a Mac it wants to save them in the top level ~/Documents directory
. I would like to specify a real location. Any ideas?
Does anyone know where or how to set the default path/directory on saving python scripts prior to running?
On a Mac it wants to save them in the top level ~/Documents directory
. I would like to specify a real location. Any ideas?
If you locate the idlelib directory in your Python install, it will have a few files with the .def extension. config-main.def has instructions on where to put the custom config files. However, looking through these I did not find any configurable paths (your install may vary). Looks like you might need to crack open the editor code to alter it.
If you open a module, that sets the default working directory.
Start IDLE.
File -> Open to open your file. And set the current working directory.
In my case, the default directory is set to the directory from which I launched IDLE. For instance, if I launched IDLE from a directory called 'tmp' in my home directory, the default save path is set to
~/tmp
. So start your IDLE like this:It seems like you can get idle into the directory you want if you run any module from that directory.
I had previously tried opening idlemain.py through the path browser. I was able to open and edit the file, but it seemed like I wasn't able to save my modifications.
I'm just glad to hear other people are having this problem. I just thought I was being stupid.
I actually just discovered the easiest answer, if you use the shortcut link labeled "IDLE (Python GUI)". This is in Windows Vista, so I don't know if it'll work in other OS's.
1) Right-click "Properties".
2) Select "Shortcut" tab.
3) In "Start In", write file path (e.g. "C:\Users...").
Let me know if this works!