[Idle-dev] The Future of Python

Glyph glyph at twistedmatrix.com
Tue Feb 11 17:30:26 CET 2014


On Feb 11, 2014, at 9:06 AM, Terry Reedy <tjreedy at udel.edu> wrote:

> On 2/10/2014 6:07 PM, Glyph wrote:
> 
>> And let me make a halfhearted attempt to bring this on-topic: it would
>> be absolutely /amazing/ if IDLE actually had a plugin to allow you to
>> write some HTML and some CSS and stuff so that new users could easily
>> get up and running with something that looks "real" to modern students
>> (i.e. a web page that they can share, not just some turtle graphics on a
>> canvas).
> 
> I need more information to know what you are suggesting.
> 
> What do you see as the relation between Python and html that Idle should be html aware rather than C aware?

It's not so mucha bout the relationship between Python and HTML, but rather between HTML and the average prospective student.  HTML is a terrible language, CSS is worse, but HTML+CSS is where the students "live" - basically everyone in the world is familiar with web pages at this point in history, so allowing them to create visual (or textual, for those with vision impairment, who will still be familiar with web browsers!) experiences that directly correspond to things they're familiar with will drive home the relevance of "CP4E".

> Why should one edit html in Idle rather that in one of the many Html Editor programs?

Why should one edit Python in Idle, for that matter? ;-)  For Python it integrates the module editing with an interactive shell; the same could be true for HTML.

> What would be Idle's competitive advantage in a crowded field?

Integration.  Idle is positioned as a simple, effective editor for learners, and smoothing the somewhat bumpy road between Python and the mess of browser technologies (HTML/CSS/JS/how do I run a server/how do I get a database created) would make it possible for learners to create whole systems that are directly useful and relevant to them.

I'm not suggesting that IDLE become a sophisticated HTML workflow tool for teams or anything like that - just that it have a basic, opinionated workflow available to ease the transition from simple input-output text programs to simple web-based things.  Let me be clear: to make this a complete package, you'd need to have better feedback than I'm able to provide from a real educator.

> Is this idea predicated on having a means to run a subset of Python 3 in a browser?

Not entirely; one still might be able to do something interesting and interactive by having Idle run a web server and having a local web browser (or HTML view, if such a thing were possible) and having server-side Python generate some HTML.

> Note 1: it would be trivial to have Idle recognize .xyz files, but it is currently a python-specific and non-python general text editor.

What is a '.xyz' file?

> Note 2: I presume, but do not know, that an extension could effectively subclass EditorWindow and override some of the methods.
> 
> One can edit html now in an editor window as plain text. What additional behaviors would you add if Idle recognized .html?  Syntax highlight embedded Python (as already requested on the tracker)?

Yup, that would be great.

> Syntax highlight html constructs (which would require an html parser)?

Yes, this would also be useful.  html5lib is one simple 'pip install' away...

> 'Run' the file (F5) in a browser rather than in a shell?  (The existing webbrowser module would make this easy.)

That would be good too.

> What would be 'amazing' is a way to have a form displayed in either by python (tkinter) or a browser, or drawings and even animation displayed on either a tkinter Canvas or the HTML5 equivalent.

+1 to that as well.

Tempting as it is to talk about the stuff related to extensions that was a bit afield of my point so I'll refrain ;-).

-g
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/idle-dev/attachments/20140211/8eb1018a/attachment.html>


More information about the IDLE-dev mailing list