Activity Not Available
0
I Use This!

Project Summary

Analyzed 4 months ago. based on code collected 4 months ago.

Python in the BrowserThis project is now obsolete. It has been replaced by:

Try PythonAn interactive Python interpreter that runs in the browser, using Silverlight 2 and IronPython.

This is ideal for tutorials and documentation, where example Python code can actually be tried in the browser. The demo has some examples 'built in' that demonstrate one way it could be used.

It requires Silverlight 2, and the Python version is 2.5.

The interpreter runs in an HTML textarea, with Javascript that communicates with Silverlight and prevents you deleting text from the console except after the interactive prompt.

Target browsers are Firefox 2 & 3, Safari and IE 7 & 8. (It won't work in other browsers until there is a version of Silverlight that works with them.)

The project is a combination of IronPython (for the interpreter loop), Javascript (for the 'console behaviour' in the textarea) and C# (as a helper to call into Silverlight from Javascript). On every keypress Javascript calls into IronPython (via the C#!). If the keypress is an 'enter', then it pushes the current line into the interpreter loop (which uses the standard library code module). Stdout is diverted to print into the textarea, where tracebacks are also sent. If you are attempting to type over, or delete, previous output then the keypress is cancelled.

Silverlight 2 is currently only available for Windows and Mac OS X, with the Firefox, Safari or IE browsers. Linux support is in the works via the Moonlight project from Mono.

Share

In a Nutshell, pythoninthebrowser...

Activity

30 Day Summary

Apr 10 2016 — May 10 2016

12 Month Summary

May 10 2015 — May 10 2016

Community

Ratings

Be the first to rate this project
 
Click to add your rating
   Spinner f6ecff617ec2ba7f559e6f535cad9b70a3f91120737535dab4d4548a6c83576c
 
Review this Project!