Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Bruce Sherwood <Bruce_Sherwood <at> ncsu.edu>
Subject: Re: The Future of Python
Newsgroups: gmane.comp.python.idle
Date: Monday 17th February 2014 14:54:16 UTC (over 3 years ago)
Here's a welcome surprise. Thanks to quick work by Brythonist Billy Earney,
with tweaks by me, the zip file below contains a demonstration of a Python
program driving WebGL in a browser, using the Brython and GlowScript
libraries. Unpack the zip file, execute server.py, open a browser, and go
to "localhost:8000/bounce.html". If you have a WebGL-enabled browser and a
GPU-based graphics card, you'll see a standard VPython/GlowScript demo, a
ball bouncing around in a box, with instructions on how to rotate and zoom
the camera.

Then inspect the contents of bounce.html, where you'll see standard Python
syntax.

There's plenty more to do, but this looks very promising.

Bruce

https://dl.dropboxusercontent.com/u/18859068/brython_glowscript.zip


On Mon, Feb 10, 2014 at 9:34 PM, Guido van Rossum  wrote:

> You've convinced me that brython is interesting. I still think it would
> require a miracle for it to become mainstream, but it has a better change
> than pythonb.org. :-)
>
>
> On Mon, Feb 10, 2014 at 3:35 PM, Glyph  wrote:
>
>>
>> On Feb 10, 2014, at 5:19 PM, Guido van Rossum  wrote:
>>
>> Then we're doomed, because this is entirely political (the companies
>> making browsers must want to do it).
>>
>>
>> Not at all.  There are a number of promising proofs of concept,
>> demonstrating different aspects of this problem: Pyjamas, the PyJS fork
of
>> Pyjamas, Skulpt, Empythoned (which actually compiles *CPython* to run in
>> the browser with surprisingly reasonable performance!), Brython, and
PyPy's
>> now defunct JS backend to name a few.  With source maps, it's even
possible
>> to use native JavaScript debugging and profiling tools on Browser-hosted
>> Python.
>>
>> The political problem is entirely based around getting the various
>> interested parties together and trying to hammer out some kind of common
>> core that they can all get running and contribute to, rather than
>> duplicating tons and tons of effort and only ever getting to a 60%
solution.
>>
>> Browser vendors seem perfectly happy to treat JavaScript as a
compilation
>> target; efforts like ASM.JS are in fact trying to formalize this process
>> and provide support for it.  Most of these Py-to-JS converters work fine
on
>> mobile devices, too.
>>
>> Guido, if you haven't checked it out, <http://www.brython.info> is a
>> *very* interesting demo: it literally makes 
			
 
CD: 3ms