Idle (should I use it)

Hello everybody:

I first became interested in Python because somebody showed me IDLE. I immediately saw that IDLE was much easier and faster to use than a calculator. I really like using IDLE for practicing Python code now. But I’m concerned that maybe it is not the preferred Python interface (I did download Jupyter Notebook earlier). Is there any reason why I shouldn’t practice coding on IDLE. Is there something better I should use on my Mac OS laptop/desktop environment?

thanks!

1 Like

If you’re using a mac I’d recommend a combo of VS Code and the terminal (for an interactive sandbox experience).

In your terminal you can type python3 (as long as you have it installed) to bring up the interactive interpreter.

If you are interested in backend I’d get acquainted with vim (and maybe nano to start off with if vim is too much).

2 Likes

The interactive tools are superb for prototyping and quick tests and they’ve become something of a standard goto for many data scientists and many in other professions will still use them frequently. The built-in interactive interpreter is OK, things like IPython and bpython are significantly prettier and user friendly (whilst still being terminal based tools). Jupyter’s notebooks are a fantastic way to annotate your learning (you can have both functioning code and an explanation together) and Jupyter Lab is closer to a full development environment (there are nicer ones out there but it’s certainly come on a long way, I kinda like it).

I would suggest being a little bit careful about only using the interactive tools as it’s easy to get in a kind of lazy coding attitude (e.g. run everything by trial and error instead of logically and overuse re-initialisation rather than actually understanding program state). Writing modules normally is useful, it’s easier to go from that to an interactive session than it is do the other way and certain good coding practices are much more obvious when you have to actually practice them.

I’m in no way suggesting you shouldn’t use interactive tools but just make sure you can still write normal programs too :slightly_smiling_face:.

1 Like

There is no reason not to use IDLE; I’m sure even Eric would find it a capable environment, especially when just starting out. It’s a small download and quick install, and easy to use, both the editor and the shell. It is a first hands on experience that every learner should have. In truth, I never or very rarely ever fire up VSC but always have the shell open on my taskbar.

Python can be installed in any user account, which in the case of IDLE is the best place for it. It will install in the User\AppData\Local\Programs folder and as long as you pin it to the taskbar, can be started with one click.

There is a ‘Scripts’ folder in the Python39 folder that is the default location of all files saved, including the Shell, which can also be saved. I recommend always using this folder so your code is easy to find (just use File - Open). The scripts folder can be organized like any other. For instance I save all my shells in a ‘Shells’ folder within that one.

Bottom line, stick to IDLE until you are completely comfortable with it, then explore other options. First you want to find out if this is something your are really keen on and will stick with for the long haul. When your skill level amps up to the point where you can envision opportunity for employment with a team, then would be the time to consider your workflow environment (likely the same as your team mates).

1 Like