Hi, I am struggling around with interactive online py tutorials with https://launchpad.net/projects/intro-to-code (ith might become securely sandboxed soon, as pypy made it possible http://blog.sandbox.lt/en/WSGI%20and%20PyPy%20sandbox :) but one more thing is I'd like to let access xturtle functionality online - one possible way could be triggering tkinter to save its canvas to ps, and then convert them with imagemagic and show via web (animated gif or static) - but if pyjamas can render GUI for js (http://www.google.lt/search?&q=pyjamas+python ), mayby there is a way to **translate turtle commands to processing.js analogues** http://ejohn.org/blog/processingjs/ would it be difficult -- how do you think? -- Jurgis Pralgauskis tel: 8-616 77613; jabber: jurgis@akl.lt; skype: dz0rdzas; Don't worry, be happy and make things better ;) http://sagemath.visiems.lt
On Fri, Feb 27, 2009 at 6:06 PM, Jurgis Pralgauskis <jurgis.pralgauskis@gmail.com> wrote:
Hi,
I am struggling around with interactive online py tutorials with https://launchpad.net/projects/intro-to-code (ith might become securely sandboxed soon, as pypy made it possible http://blog.sandbox.lt/en/WSGI%20and%20PyPy%20sandbox :)
but one more thing is I'd like to let access xturtle functionality online - one possible way could be triggering tkinter to save its canvas to ps, and then convert them with imagemagic and show via web (animated gif or static)
There's probably a better way: use the html canvas. I tried to implement a turtle module to be embedded with Crunchy (http://code.google.com/p/crunchy) - it is available as a demo experimental feature. You could use this as a starting point if you want. André
- but if pyjamas can render GUI for js (http://www.google.lt/search?&q=pyjamas+python ), mayby there is a way to **translate turtle commands to processing.js analogues** http://ejohn.org/blog/processingjs/
would it be difficult -- how do you think?
-- Jurgis Pralgauskis tel: 8-616 77613; jabber: jurgis@akl.lt; skype: dz0rdzas; Don't worry, be happy and make things better ;) http://sagemath.visiems.lt _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Hey, thats cute :) 1) I played around, and added Turtle.circle() to actions :) in code its called called circle_forward(self, radius, extent=None) and also aliased as circle you can find it http://files.akl.lt/users/jurgis/python/crunchy/ 1a) seems it would be best to use canvas interface methods, which are already in graphics module (according to DRY phylosophy) or at least decine upon method naming -- which just generate code vs those that pass it to exec_js plugin 1b) seems, like polygons and filling also would not be a big problem https://developer.mozilla.org/en/Canvas_tutorial/Drawing_shapes#section_9 for fill you'd just jave to collect the points and then repeat them with fill() at end 2) and also I'd like to make it convert all actions to javacript code at once then it would be easier to implement turtel_js and graphics in other projects -- easily escaping crunchy :D As now for asinchronous update, the server and session must be up all the time 2a) then probably time.sleep would be also good to interface directly to js something like http://groups.google.co.in/group/phpguru/browse_thread/thread/8215dcdc2ac732... 3) how is it related to server_root/reborg js experiments? so I'll try sth more tomorrow or in a week-time On Sat, Feb 28, 2009 at 2:18 AM, Andre Roberge <andre.roberge@gmail.com> wrote:
On Fri, Feb 27, 2009 at 6:06 PM, Jurgis Pralgauskis
but one more thing is I'd like to let access xturtle functionality online - one possible way could be triggering tkinter to save its canvas to ps, and then convert them with imagemagic and show via web (animated gif or static)
There's probably a better way: use the html canvas. I tried to implement a turtle module to be embedded with Crunchy (http://code.google.com/p/crunchy) - it is available as a demo experimental feature. You could use this as a starting point if you want.
-- Jurgis Pralgauskis Don't worry, be happy and make things better ;) http://sagemath.visiems.lt
On Sat, Feb 28, 2009 at 11:07 AM, Jurgis Pralgauskis <jurgis.pralgauskis@gmail.com> wrote:
Hey, thats cute :)
Thanks. :-)
1) I played around, and added Turtle.circle() to actions :) in code its called called circle_forward(self, radius, extent=None) and also aliased as circle you can find it http://files.akl.lt/users/jurgis/python/crunchy/
Looks nice.
1a) seems it would be best to use canvas interface methods, which are already in graphics module (according to DRY phylosophy) or at least decine upon method naming -- which just generate code vs those that pass it to exec_js plugin
I agree... this was (and still is) just an experiment.
1b) seems, like polygons and filling also would not be a big problem https://developer.mozilla.org/en/Canvas_tutorial/Drawing_shapes#section_9 for fill you'd just jave to collect the points and then repeat them with fill() at end
Agreed.
2) and also I'd like to make it convert all actions to javacript code at once then it would be easier to implement turtel_js and graphics in other projects -- easily escaping crunchy :D
That's a good point. However, the idea was to be able to control a turtle from an interpreter, typing one instruction at a time and seeing the result.
As now for asinchronous update, the server and session must be up all the time
2a) then probably time.sleep would be also good to interface directly to js something like http://groups.google.co.in/group/phpguru/browse_thread/thread/8215dcdc2ac732...
3) how is it related to server_root/reborg js experiments?
It's not - at least not for now. The reeborg experiment is an very early prototype of an implementation of rur-ple (http://rur-ple.sourceforge.net) inside Crunchy. You can see a different version live at http://reeborg.world.googlepages.com/reeborg.html André
so I'll try sth more tomorrow or in a week-time
On Sat, Feb 28, 2009 at 2:18 AM, Andre Roberge <andre.roberge@gmail.com> wrote:
On Fri, Feb 27, 2009 at 6:06 PM, Jurgis Pralgauskis
but one more thing is I'd like to let access xturtle functionality online - one possible way could be triggering tkinter to save its canvas to ps, and then convert them with imagemagic and show via web (animated gif or static)
There's probably a better way: use the html canvas. I tried to implement a turtle module to be embedded with Crunchy (http://code.google.com/p/crunchy) - it is available as a demo experimental feature. You could use this as a starting point if you want.
-- Jurgis Pralgauskis Don't worry, be happy and make things better ;) http://sagemath.visiems.lt
Let's celebrate!! not sure, how it's done under the hood, but it works http://interactivepython.org/courselib/static/thinkcspy/PythonTurtle/hellotu... one can even code turtle online! http://interactivepython.org/courselib/static/thinkcspy/PythonTurtle/hellotu... ps.: found a link from http://pythontutor.com/ :) and the source of magic seems to be https://github.com/bnmnetp/runestone On Sat, Feb 28, 2009 at 6:50 PM, Andre Roberge <andre.roberge@gmail.com> wrote:
On Sat, Feb 28, 2009 at 11:07 AM, Jurgis Pralgauskis <jurgis.pralgauskis@gmail.com> wrote:
Hey, thats cute :)
Thanks. :-)
1) I played around, and added Turtle.circle() to actions :) in code its called called circle_forward(self, radius, extent=None) and also aliased as circle you can find it http://files.akl.lt/users/jurgis/python/crunchy/
Looks nice.
1a) seems it would be best to use canvas interface methods, which are already in graphics module (according to DRY phylosophy) or at least decine upon method naming -- which just generate code vs those that pass it to exec_js plugin
I agree... this was (and still is) just an experiment.
1b) seems, like polygons and filling also would not be a big problem https://developer.mozilla.org/en/Canvas_tutorial/Drawing_shapes#section_9 for fill you'd just jave to collect the points and then repeat them with fill() at end
Agreed.
2) and also I'd like to make it convert all actions to javacript code at once then it would be easier to implement turtel_js and graphics in other projects -- easily escaping crunchy :D
That's a good point. However, the idea was to be able to control a turtle from an interpreter, typing one instruction at a time and seeing the result.
As now for asinchronous update, the server and session must be up all the time
2a) then probably time.sleep would be also good to interface directly to js something like http://groups.google.co.in/group/phpguru/browse_thread/thread/8215dcdc2ac732...
3) how is it related to server_root/reborg js experiments?
It's not - at least not for now. The reeborg experiment is an very early prototype of an implementation of rur-ple (http://rur-ple.sourceforge.net) inside Crunchy. You can see a different version live at http://reeborg.world.googlepages.com/reeborg.html
André
so I'll try sth more tomorrow or in a week-time
On Sat, Feb 28, 2009 at 2:18 AM, Andre Roberge <andre.roberge@gmail.com> wrote:
On Fri, Feb 27, 2009 at 6:06 PM, Jurgis Pralgauskis
but one more thing is I'd like to let access xturtle functionality online - one possible way could be triggering tkinter to save its canvas to ps, and then convert them with imagemagic and show via web (animated gif or static)
There's probably a better way: use the html canvas. I tried to implement a turtle module to be embedded with Crunchy (http://code.google.com/p/crunchy) - it is available as a demo experimental feature. You could use this as a starting point if you want.
-- Jurgis Pralgauskis Don't worry, be happy and make things better ;) http://sagemath.visiems.lt
-- Jurgis Pralgauskis tel: 8-616 77613; Don't worry, be happy and make things better ;) http://galvosukykla.lt
interactivepython.org uses a customized version of Skulpt (www.skulpt.org) to deliver a full-fledged Python interpreter with a Turtle graphics library in the web browser, with no server calls required. This means that you can download one of those webpages, save it to a USB stick, and deploy it in a classroom in a region with no Internet access. Skulpt has tremendous potential for bringing educational Python to the browser ... a student might be working with me to port pythontutor.com to Skulpt in the coming months. On Wed, Sep 26, 2012 at 2:32 PM, Jurgis Pralgauskis < jurgis.pralgauskis@gmail.com> wrote:
Let's celebrate!!
not sure, how it's done under the hood, but it works
http://interactivepython.org/courselib/static/thinkcspy/PythonTurtle/hellotu...
one can even code turtle online!
http://interactivepython.org/courselib/static/thinkcspy/PythonTurtle/hellotu...
ps.: found a link from http://pythontutor.com/ :) and the source of magic seems to be https://github.com/bnmnetp/runestone
On Sat, Feb 28, 2009 at 11:07 AM, Jurgis Pralgauskis <jurgis.pralgauskis@gmail.com> wrote:
Hey, thats cute :)
Thanks. :-)
1) I played around, and added Turtle.circle() to actions :) in code its called called circle_forward(self, radius, extent=None) and also aliased as circle you can find it http://files.akl.lt/users/jurgis/python/crunchy/
Looks nice.
1a) seems it would be best to use canvas interface methods, which are already in graphics module (according to DRY phylosophy) or at least decine upon method naming -- which just generate code vs those that pass it to exec_js plugin
I agree... this was (and still is) just an experiment.
1b) seems, like polygons and filling also would not be a big problem
https://developer.mozilla.org/en/Canvas_tutorial/Drawing_shapes#section_9
for fill you'd just jave to collect the points and then repeat them with fill() at end
Agreed.
2) and also I'd like to make it convert all actions to javacript code at once then it would be easier to implement turtel_js and graphics in other projects -- easily escaping crunchy :D
That's a good point. However, the idea was to be able to control a turtle from an interpreter, typing one instruction at a time and seeing the result.
As now for asinchronous update, the server and session must be up all
2a) then probably time.sleep would be also good to interface directly
to js
something like
http://groups.google.co.in/group/phpguru/browse_thread/thread/8215dcdc2ac732...
3) how is it related to server_root/reborg js experiments?
It's not - at least not for now. The reeborg experiment is an very early prototype of an implementation of rur-ple (http://rur-ple.sourceforge.net) inside Crunchy. You can see a different version live at http://reeborg.world.googlepages.com/reeborg.html
André
so I'll try sth more tomorrow or in a week-time
On Sat, Feb 28, 2009 at 2:18 AM, Andre Roberge <andre.roberge@gmail.com> wrote:
On Fri, Feb 27, 2009 at 6:06 PM, Jurgis Pralgauskis
but one more thing is I'd like to let access xturtle functionality online - one possible way could be triggering tkinter to save its canvas to
On Sat, Feb 28, 2009 at 6:50 PM, Andre Roberge <andre.roberge@gmail.com> wrote: the time ps,
and then convert them with imagemagic and show via web (animated gif or static)
There's probably a better way: use the html canvas. I tried to implement a turtle module to be embedded with Crunchy (http://code.google.com/p/crunchy) - it is available as a demo experimental feature. You could use this as a starting point if you want.
-- Jurgis Pralgauskis Don't worry, be happy and make things better ;) http://sagemath.visiems.lt
-- Jurgis Pralgauskis tel: 8-616 77613; Don't worry, be happy and make things better ;) http://galvosukykla.lt _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Hi Everyone, The source code for skulpt, and my implementation of xturtle is also available on github at http://github.com/bnmnetp/skulpt. Skulpt is a Javascript implementation of the Python language that runs in the browser. I spent a good chunk of my Sabbatical a couple years ago implementing the turtle code in Javascript and then writing a wrapper to fit it into the Skulpt environment. We, at Luther College, have used the turtle code pretty extensively in the context of our interactive textbook (http://interactivepython.org) for a couple of years now. This fall we have about 25 schools around the world using the book, so I'm starting to think its pretty stable. :-) The turtle module is still missing event processing functions such as onKey, onClick, etc. But I think the vast majority of the functionality is there. If you do find something missing or have feature requests, please let me know. Brad On Wed, Sep 26, 2012 at 4:32 PM, Jurgis Pralgauskis <jurgis.pralgauskis@gmail.com> wrote:
Let's celebrate!!
not sure, how it's done under the hood, but it works http://interactivepython.org/courselib/static/thinkcspy/PythonTurtle/hellotu...
one can even code turtle online! http://interactivepython.org/courselib/static/thinkcspy/PythonTurtle/hellotu...
ps.: found a link from http://pythontutor.com/ :) and the source of magic seems to be https://github.com/bnmnetp/runestone
On Sat, Feb 28, 2009 at 6:50 PM, Andre Roberge <andre.roberge@gmail.com> wrote:
On Sat, Feb 28, 2009 at 11:07 AM, Jurgis Pralgauskis <jurgis.pralgauskis@gmail.com> wrote:
Hey, thats cute :)
Thanks. :-)
1) I played around, and added Turtle.circle() to actions :) in code its called called circle_forward(self, radius, extent=None) and also aliased as circle you can find it http://files.akl.lt/users/jurgis/python/crunchy/
Looks nice.
1a) seems it would be best to use canvas interface methods, which are already in graphics module (according to DRY phylosophy) or at least decine upon method naming -- which just generate code vs those that pass it to exec_js plugin
I agree... this was (and still is) just an experiment.
1b) seems, like polygons and filling also would not be a big problem https://developer.mozilla.org/en/Canvas_tutorial/Drawing_shapes#section_9 for fill you'd just jave to collect the points and then repeat them with fill() at end
Agreed.
2) and also I'd like to make it convert all actions to javacript code at once then it would be easier to implement turtel_js and graphics in other projects -- easily escaping crunchy :D
That's a good point. However, the idea was to be able to control a turtle from an interpreter, typing one instruction at a time and seeing the result.
As now for asinchronous update, the server and session must be up all the time
2a) then probably time.sleep would be also good to interface directly to js something like http://groups.google.co.in/group/phpguru/browse_thread/thread/8215dcdc2ac732...
3) how is it related to server_root/reborg js experiments?
It's not - at least not for now. The reeborg experiment is an very early prototype of an implementation of rur-ple (http://rur-ple.sourceforge.net) inside Crunchy. You can see a different version live at http://reeborg.world.googlepages.com/reeborg.html
André
so I'll try sth more tomorrow or in a week-time
On Sat, Feb 28, 2009 at 2:18 AM, Andre Roberge <andre.roberge@gmail.com> wrote:
On Fri, Feb 27, 2009 at 6:06 PM, Jurgis Pralgauskis
but one more thing is I'd like to let access xturtle functionality online - one possible way could be triggering tkinter to save its canvas to ps, and then convert them with imagemagic and show via web (animated gif or static)
There's probably a better way: use the html canvas. I tried to implement a turtle module to be embedded with Crunchy (http://code.google.com/p/crunchy) - it is available as a demo experimental feature. You could use this as a starting point if you want.
-- Jurgis Pralgauskis Don't worry, be happy and make things better ;) http://sagemath.visiems.lt
-- Jurgis Pralgauskis tel: 8-616 77613; Don't worry, be happy and make things better ;) http://galvosukykla.lt _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
-- Brad Miller Associate Professor of Computer Science Luther College 2010 - 2011 Sabbatical Contact Info Cell: 419-2112 email: bmiller@luther.edu
účastníci (4)
-
Andre Roberge
-
Brad Miller
-
Jurgis Pralgauskis
-
Philip Guo