[IronPython] Python in the Browser updates
Michael Foord
fuzzyman at voidspace.org.uk
Tue Jun 17 23:51:41 CEST 2008
Hello all,
Sorry for the noise - but tomorrow I hope to package this for a release
and if any of you get the chance to give me any feedback before then.
http://www.voidspace.org.uk/ironpython/silverlight-console/console.html
I think I have fixed all the basic usability issues (it is no longer
possible to screw up the console so that it refuses further input for
example). To *really* fix input I ought to move execution into its own
thread so that we can interrupt infinite loops [1] - but that is a
bigger change so I am resisting it for the moment.
The big change is that I have added some simple code snippets - as an
example of how it could be used in tutorials or for teaching Python.
It is also easy to customize - the source code (200 lines of Python, 70
lines of Javascript, 25 lines of C#) shows how to prepopulate the
execution context and show the first few lines of code in the interpreter.
You can get the sourcecode from the repository of course:
http://code.google.com/p/pythoninthebrowser/
All the best,
Michael Foord
[1] and then decide whether on windows a ctrl-c should send a keyboard
interrupt or copy to the clipboard...
Michael Foord wrote:
> For those who are interested, I've updated "Python in the Browser".
>
> Both the repository:
>
> http://code.google.com/p/pythoninthebrowser/
>
> And the online demo:
>
> http://www.voidspace.org.uk/ironpython/silverlight-console/console.html
>
> There are a few minor but nice improvements:
>
> * The Javascript now works with IE 7!
> * The textarea scrolls as input is printed
> * The context window is disabled to prevent you pasting over the input
> area - not sure if this is really an improvement though...
> * The input area is cleared on load - to stop browsers like Firefox
> and Safari repopulating the textarea for us on browser refresh
> * Recursion limit is set
>
> I think it is basically in a useful state now... I might push out a
> '0.1' release from the current SVN head.
>
> All the best,
>
> Michael Foord
>
--
http://www.ironpythoninaction.com/
http://www.theotherdelia.co.uk/
http://www.voidspace.org.uk/
http://www.ironpython.info/
http://www.resolverhacks.net/
More information about the Ironpython-users
mailing list