Hello, I've just started to learn Python. I have two questions:
1. Is there any way to set up default folder for Python files (that Atest from introductionary example)?
2. can you suggest any good Python IDE (existing is OK, but I have a fealing that I'm working in ordinary colored Notepad?

Thanks

Dani AI

Generated

Two practical fixes plus a few IDE options that weren’t spelled out in-thread.

For the default folder on Windows, change the IDLE shortcut’s working folder. Edit the IDLE shortcut (right‑click → Properties → Shortcut tab) and set the “Start in” field to the folder to be used for Open/Save dialogs and the shell’s current working directory. Launching IDLE from a command prompt after doing a cd to the desired folder has the same effect. (stackoverflow.com)

If a programmatic startup is preferred, IDLE can run a startup file (use the -s option) so a small script can set the working directory automatically. Another approach is to have a short site-wide startup module (a sitecustomize.py placed on the interpreter’s site-packages path) that performs an os.chdir(...) at interpreter startup. A minimal example (put this in a startup script that IDLE runs, or run it interactively) is shown below:

import os
os.chdir(r"C:\Path\To\MyScripts")

Those startup mechanisms are documented in IDLE’s options and in Python’s site/os behavior. (docs.python.org)

For an editor with a more MSVC++/Dev‑C++ like project/workspace UI and better Unicode handling, modern choices include Visual Studio Code, PyCharm (JetBrains), or beginner‑friendly Thonny. They give project folders, integrated terminals, and robust file dialogs so the default-folder problem is handled by opening a workspace rather than by fiddling with shortcuts. Echoing ’s note about editor quirks, Unicode handling varies; prefer actively maintained editors for international text. (code.visualstudio.com)

Quick troubleshooting: if a GUI IDE won’t open or seems to do nothing, start it from a console (or run python -m idlelib) to capture any error tracebacks, and check IDLE’s config files (or delete the ~/.idlerc/ settings if they’re corrupted). That often reveals the root cause. (docs.python.org)

Recommended Answers

All 5 Replies

Which IDE are you using now?
Which operating system do you have?

To create a subdirectory/subfolder you can use the "Save File As" dialog box of your IDE. There is a small icon in the top row you can click to create a new folder.

Oops now I know what you mean. The old fashioned IDLE does not start up with this default folder. I use DrPython a lot and that IDE lets you set the default folder and many other things. You can download it from:
http://sourceforge.net/projects/drpython/

DrPython has one quirk, it doesn't like foreign characters in its code window. It displays them but does not save then, giving you an error instead!

An IDE without this quirk is PythonWin from:

Well, I have Python 2.4 and Windows XP.
I used that IDLE (Python GUI) through shortcut in Start Menu.
I'll check your links, thanks.

My native english is not english and I use characters like ćžđš and similar, but I never name variables with these character. Do you mean by that "quirk" that IDE does not like variable name varak? I never use my language characters when programming.
Is there and Python IDE similar to MSVC++ .net or Bloodshed Dev-Cpp since I have a lot experiance with it?
I think I'll try Drpython since you use it...
Thank you
P.S. So far I really enjoy reading the tutorial.

Using something like
varak = 7
or even
print "varak"
in DrPython would give you an Encoding Error and wouldn't even save the code file!

PythonWin simply removes the symbol and converts it to the letter c. It does however take spanish and german symbols. I guess your exceeds the extended ASCII characters and gets you into unicode.

Bummer indeed, going international stops right there!

Using something like
varak = 7
or even
print "varak"
in DrPython would give you an Encoding Error and wouldn't even save the code file!

PythonWin simply removes the symbol and converts it to the letter c. It does however take spanish and german symbols. I guess your exceeds the extended ASCII characters and gets you into unicode.

Bummer indeed, going international stops right there!

Thank you for the prompt answer. In the meantime I've downloaded DrPython and installed it. Now I have on my desktop that little snake DrPython, but when I double click on it, mouse pointer changes for a few seconds and then nothing happens. Maybe I need to set up something?

Do you have the wxPython GUI library installed?
If not, you need it and can get from:
http://wiki.wxpython.org/
or

Download wxPython2.5-win32-unicode-2.5.4.1-py24.exe (or in the US use the ansi version).

Maybe DrPython will work with foreign characters on your computer, it doesn't on the standard US MicroSoft machine.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.