Try Python!

Armin Ronacher armin.ronacher at active-4.com
Wed Mar 29 15:23:21 EST 2006


Hiho,

One week ago I came across the nice `Try Ruby!`_ demonstration which
features an ajax based ruby console and a 20 minutes ruby tutorial.
I really liked that application and so I started to port that to
python.
Since I got a bit confused by the very complex javascript code I wrote
a
webconsole from scratch.

The result is a very basic python console which behaves like the CLI
one, except that it can't handle `raw_input` or any other method call
trying to access `sys.stdin`.

At the moment the application is multithreaded and evaluated
expressions
in a dict holding the sessions variables of the client connections.

Because of the behaviour the application breaks down easily and isn't
secure. This happens because I haven't finished it yet. Additionally
sessions don't have a timeout so you have to restart the server if it's
eating to much RAM.

If someone is interested in putting up that application on a public
server I can tell the application to spawn from inside XEN hosts and to
use forking instead of the multithreaded approach currently used.

The application is licensed under the GNU GPL, the sourcecode is
available via svn from::

    http://trac.pocoo.org/repos/trypy

Since it requires Paste, PasteDeploy and the current colubrid checkout,
here the installation for copy/pasteing:

- easy_install Paste
- easy_install PasteDeploy
- svn co http://trac.pocoo.org/repos/trypy
- cd trypy
- svn co http://trac.pocoo.org/repos/colubrid/trunk/colubrid
- python trypy.py

The last command starts the application.

And here a screenshot of a running session:
http://trac.pocoo.org/wiki/TryPy

Regards,
Armin




More information about the Python-list mailing list