Hacker Timesnew | past | comments | ask | show | jobs | submitlogin
Python IDLE Reimagined (inventwithpython.com)
66 points by ingve on Nov 23, 2014 | hide | past | favorite | 29 comments


I've always kind of wondered what IDLE is good for, seeing as how I've already got a perfectly good command line to run python from.


Python is my main language at this point. One of my uses is writing test scripts that may end up running on several computers that are both on- and off-network. So I walk up to a computer, install Python, maybe one or two modules, my program, hook up some hardware, and off we go. At my workplace, this is presently around a dozen computers.

There's a chance that I will need an editor: If a program crashes, needs to be changed, or I want to show somebody how to modify it themselves. Having something built-in with the nice colors, indents, and syntax checking, the same on every PC, is just plain handy. Otherwise, it wouldn't kill me to add a code editor to my collection of installers that I carry in my pocket, but it would be one more thing.

So I like the idea of a built in editor.


For beginners to learn. I started on it as it's super easy to run and debug on windows, which doesn't have a good terminal.


Windows has such piss poor command line support that it's the only reasonable way to use a python REPL. Outside of Windows I don't think it really has much of a use.

Personally I'd choose iPython notebooks over IDLE on any platform but IDLE comes with python by default so it's easier in some situations like teaching a class.


My answer: I have a cursor I can move to previous lines, copy-paste like I do in a code editor, and generally move around like I would in a code editor. My take is kind of the opposite: I don't believe we don't have these capabilities in other command lines.


For Windows, it's easier to start IDLE than it is to start python from a command line, and the editor is better. It's still terrible, but at least it's better.


> For Windows, it's easier to start IDLE than it is to start python from a command line, and the editor is better. It's still terrible, but at least it's better.

I am pretty sure the Windows Python installer adds Python to your path. On my system, at any rate, starting Python on the command line consists of typing "python" and pressing enter. How can it get any easier?

That said, starting IDLE is easier, because hitting Winkey + py + enter opens IDLE whereas there's the extra step of opening the terminal if I want to use it on the command line.


Reminds me of DrRacket.

It's a good target for a learner's basic IDE.


I've taught a number of newbies Python (including a team of data scientists) using IPython notebooks and it's convinced me that is the right way to do it. I can setup a few notebooks with datasets, database connectivity, etc. and all they have to do is point a browser at the URL and start hacking. There's nothing to download, no environment variables to set, and no packages to install / setup.


From the article: "I’ve started a wiki for an IDLE redesign project."

What next, the Kickstarter? Usually, you actually do something before issuing the press release.


Exactly my thinking.


> Instant Google-search for error messages.

Now there's an idea. Does anyone have recommendations for getting a "professional developer grade" IDE to do that?


There's a official Visual Studio extension that does something similar[0]. It's surprisingly well received by the HN crowd[1], for a Microsoft product that is.

[0] http://blogs.msdn.com/b/visualstudio/archive/2014/02/17/intr...

[1] https://qht.co/item?id=7253711


at the intersection of vs extensions + python + surprisingly-well-reviewed-on-HN-for-a-microsoft-product, also check out http://pytools.codeplex.com


The redesigned version looks a little like OLPC's Pippy (which uses GTK) -- maybe some of that code will be useful:

http://wiki.laptop.org/go/Pippy


why not just use geany with python support, you can also enhance the python plugin and it runs on windows/linux.


Of course other text editors exist, but the author is looking for something that fits the same niche as IDLE, which means it needs to run everywhere that Python runs.


Devs are going to use the hell out of Search Google for Errors Option. That's a game changer.


I have a perfectly good window manager. Let me use it, please.


You've probably also got a perfectly good text editor, so you're not the target audience.


If someone who pretty much exclusively uses IDLE for Python code editing isn't the target audience, who is?

And a text editor for Python code isn't "perfectly good". There are things that IDLE can do that text editors cannot. Name completion based on modules loaded, that sort of thing.


Kind of like spider? Or Emacs? Or PyDev?


More like DrRacket.


I know DrRacket from back when it was called DrScheme and you had to manually set it from "extremely limited scheme-like language that won't allow you to do anything" to "actual R5RS scheme".

I found DrScheme and its cousin DrJava nice for beginners, but I think within the context of Python, IPython Notebook is just so much better because you can wire in some pretty pictures and formatting. Then again, the separation between "code that is meant to stay" and the REPL may be a useful concept that you want to teach beginners.


I don't use IPython, so I dunno what exactly IPython gives. However, DrRacket does allow images as input and output directly in REPL and source[1]

Another cool DrRacket feature for beginners as well as experienced is its debugging features. Whenever your program interrupts, be it exception or breakpoint, you can visually trace bindings to its source by hovering pointer on symbols which in turns shows a series of arrows.

[1] http://docs.racket-lang.org/quick/


DrRacket is on par with IPython qtconsole and only slightly more limited than notebook nowadays.

Embedding images or graphs is very well supported as well as normal text; you can also easily save such sessions to a file too. Such a file does need DrRacket to be viewed, but other than that I'd say it's rather close to IPython Notebook.

Additionally DrRacket has a nice feature for displaying contracts and limited help/docstring for highlighted symbol, a bit of auto-completion (no context sensitivity unfortunately) and a feature for displaying where the identifier comes from with arrows, which is neat sometimes (to be fair it breaks down completely when working with many macros). There are also three killer features: macro stepper, debugger and futures visualizer (which lets you see sync points of your parallel computations to (hopefully) optimize them away).

Personally I switched to Emacs, because I deal with more than one Lisp on a regular basis and because I find DrRacket harder to customize (this may be just me being used to Emacs however). I still use DrRacket when working with graphs in Racket and it's very pleasant.

Anyway, DrRacket is very high quality basic IDE and I wish every language would come with something similar. It has its problems (performance, sometimes), but by the time you hit those you're probably already using something more advanced.


DrRacket defaults to the full Racket language. You have to switch over to use the teaching languages or the r*rs implementations, but Racket is there from the off, and switching languages is as easy as editing the #lang line at the top if you don't feel like arsing around with the GUI for it.


The defaults has changed in modern times (5 years ago?).


You still have to tell it the mode. But you usually do that once at the top of a file (recommended) or set it as the default.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: