On Thu, Feb 6, 2014 at 10:31 AM, Bruce Sherwood <bruce_sherw...@ncsu.edu>wrote:
> I was surprised that in talking about the future of Python Jessica didn't > touch on what may be really crucial, which is the importance of being able > to use Python in client-side browser programming. Running in a browser is > of rapidly increasing importance and Python could easily get left behind. > There exist multiple projects whose goal is to be able to compile Python to > JavaScript to address this issue. It looks to me like Brython may be the > best bet, in that it seems to be an active development with a small but > growing community of interested parties. What do you think about this, > Guido? > I think this is a lost cause. Many very smart people have broken their heads against this particular wall. > I'll mention that with the aid of Steve Spicklemire VPython has been > converted to be based on wxPython, which was vital in order to get off > Carbon and onto Cocoa on the Mac, and which also makes it possible to use > wxPython widgets with VPython 3D canvases. I'm happy to report that in the > last six months there were nearly 50,000 downloads of VPython, and that > it's now featured in four (soon to be five) computational physics textbooks. > That's awesome! > Inspired by VPython, with a big initial push from David Scherer, the > originator of VPython, I'm developing GlowScript (glowscript.org) where > you can write VPython-like 3D animations using WebGL, writing in JavaScript > or CoffeeScript. A minimal program is the single-line program > > box() > > This program places a WebGL canvas in the window, displays a cube in the > window, creates lights to illuminate the scene, places the camera so that > the cube fills the window, and enables mouse interactions to zoom and > rotate. You can of course control all of these elements, but there are lots > of good defaults to get going easily. Needless to say writing WebGL > programs with other tools is vastly more difficult. > > It's already the case that it's very nice to be able to send a URL in an > email and have the recipient click that link to see a 3D animation rather > than asking them to install Python and VPython. Here's a simple example > that will run in WebGL-enabled browsers: > > > http://www.glowscript.org/#/user/GlowScriptDemos/folder/Examples/program/Bounce-CoffeeScript > > Many more demo programs are available at glowscript.org. > > However: I don't like the syntax of JavaScript, especially for novice > programmers, and even though CoffeeScript is more Pythonesque its syntax > and use of white space is kind of quirky and, I judge, not good for > novices. I would love to enable Python as one of the languages (indeed the > major language) for novices and experts to write GlowScript programs. > Agreed that CoffeeScript is not newbie-friendly. But browsers have been even more unfriendly to running Python than mobile platforms. At least for the latter we have Kivy. -- --Guido van Rossum (python.org/~guido)
_______________________________________________ IDLE-dev mailing list IDLE-dev@python.org https://mail.python.org/mailman/listinfo/idle-dev