We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › PRender: Processing in Python
Page Index Toggle Pages: 1
PRender: Processing in Python (Read 2317 times)
PRender: Processing in Python
Feb 27th, 2009, 6:23am
 
Hey Y'all,

I love Processing, but I find Python handy too, so I mashed them up together. The result is PRender:

http://github.com/bmander/prender/tree/master

Prender is a python module you can use to drive a Processing renderer subprocess. Like this:

 from prender import processing
 pr = processing.BaseRenderer()
 pr.start(200,200)
 pr.line(0,0,100,100)
 pr.line(0,100,100,0)
 pr.saveLocal( "x.png" )
 pr.stop()

I find PRender handy for making maps. For example:

http://www.flickr.com/photos/ewedistrict/3312594211/sizes/o/in/photostream/ (big)

I was able to take the peculiar raw geographical data format and print it into the Processing renderer with nearly absurd ease, allowing me to make more stuff and experiment more quickly.

Cheers,
B
Re: PRender: Processing in Python
Reply #1 - Feb 27th, 2009, 11:08am
 
Thanks !!!
I'll try it this weekend.
I love python.

cameyo
Re: PRender: Processing in Python
Reply #2 - May 31st, 2009, 8:41pm
 
This is pretty cool and I'll have to play with it

Is there a way to use the processing renderer with more control than the drawing instructions?  Can I instruct the renderer to do things like read from a file and then do some looping to draw from that file?  or would it be better to read all of my data into python and then send only the draw commands to processing?

Would it be possible to feed a .pde file into the renderer as a way to get close to a CLI for processing?  It would be nice hack to be able to batch process things from a command line
Re: PRender: Processing in Python
Reply #3 - Oct 8th, 2009, 1:27pm
 
You might also want to try pyprocessing, an experimental Processing implementation written in Python and using pyglet/OpenGL. See http: //code.google.com/p/pyprocessing/
Page Index Toggle Pages: 1