[Python-ideas] Summer of Code Project Idea: Python Apps in the Browser

Michael Foord fuzzyman at gmail.com
Fri Aug 26 03:11:13 CEST 2011


On 25 August 2011 23:45, Raymond Hettinger <raymond.hettinger at gmail.com>wrote:

> The http://gumbyapp.com/ <http://t.co/mPKzyp1> project succeeded in
> getting Python to run in the browser but it can't import pure python modules
> (because there is no filesystem in the browser).
>
> I think it would be wonderful to beef-up this project by bundling-in the
> rest of the standard library.  Gumby was built by compiling CPython to LLVM
> and then generating Javascript.  ISTM it would be possible to write a script
> to transform pure python standard library modules into C strings that could
> also be part of the final build.  The import-statement would have to be
> hooked to search for the C string instead of a physical file.
>
> If that technique works, it may not be hard to extend it so that user
> defined python modules could also be incorporated.  If so, it would become
> possible to create standalone Python apps that run in the browser.   The
> process is likely to be inefficient, but the gumbyapp site shows that it
> might be good enough for some purposes.
>
>

There's also Skulpt, an implementation of Python in Javascript (no idea how
complete it is but I saw some impressive demos a while ago):

    http://code.google.com/p/skulpt/

I've no idea how skulpt handles imports (or even if it does).

There is also pyjamas which translates Python code to Javascript:

    http://pyjs.org/

Pyjamas translates dependencies too, but I guess it can't do dynamic
imports.

Plus IronPython runs in the Silverlight runtime. Probably of less interest
to this crowd though. :-)

All the best,

Michael Foord



>
> Raymond
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>
>


-- 

http://www.voidspace.org.uk/

May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20110826/b727ff79/attachment.html>


More information about the Python-ideas mailing list