We are about to switch to a new forum software. Until then we have removed the registration on this forum.
NOTE: This project is DEPRECATED. Check out processing.py's Python Mode instead - it's in Processing's "Add Mode" dropdown menu!
The download: PythonMode.zip
The repo: python-mode-processing
Unzip into [sketch folder]/mode/PythonMode
, so that files have paths like [sketch folder]/mode/PythonMode/mode.properties
. Then, start up processing, and select Python Mode!
Things that work, usually:
Things that haven't happened yet:
In general, the whole thing is buggier than a Volkswagen full of cockroaches and not quite ready for release, but I don't have time to finish it right now, so I figured I'd put it out there and see what people think.
I made this partly because I love processing and python, and think that python's syntax combined with processing's semantics is a recipe for awesome. Java is a great language but python can be clearer and cleaner, especially for small projects and beginning coders.
I also made this because I had spare time and wanted to see what programming a larger project was like. I didn't really have any cohesive plan or follow any best practices, but the code is commented and usually works. The github repo is here and I would love bug reports and contributions, but I don't really have time to fix things right now- if anyone wants to take a crack at it I will gladly hand over the reigns.
A few final notes:
Comments
Note: I just realized, a month after the fact, that the download link I posted didn't work. It's now updated, and you should be able to actually download the mode now! Whoops. :|
Thanks for the update. Everyone on the team really wants a Python mode, but we're all too stretched keeping regular Processing running. Have you thought about maintaining this Mode more seriously?
A nice bit of work. It seems to be the case that to work in the processing ide, all sketches (irrespective of mode) need to carry the extension *.pde and be wrapped in an eponymous sketch folder. This makes working in the processing ide somewhat less attractive for pythonistas and rubyists, who using their favourite/regular editor suffer no such restrictions. Anyway I've put in the extra effort to modify some of the sketches I developed for processing.py see my fork https://github.com/monkstone/python-mode-processing (also I found that the mode builds OK against processing-2.1.0 and jdk1.7.0_45).
monkstone: I noticed that- there's a method somewhere that allows you to set the file extensions a mode can work with (and therefore edit other files) but either I've misimplemented it or it doesn't work. Also, the mode currently does some strange contortions to make sketches run as expected, which probably wouldn't transition very well to other editors... I could refactor that into a library that could be imported; actually that is probably very much what I should do. Hm. Also, those examples are excellent, I'd be happy to merge them (although some of them run into lurking bugs in the mode- P3D occasionally spits out errors for no reason, the check if a sketch is static is fairly naive... I can fix those).
REAS: Yeah, I have. I'm ridiculously busy right now (high school, college applications, etc.) but I should have a little more free time soon. I could take a few weekends and work through the outstanding bugs I'm aware of, get monkstone's examples to work. Could the mode eventually be added to the download menu in vanilla Processing?
But how do you export to pdf from pyglet? :(
You are confused, this is not pyprocessing, it is nearer processing.py.
I'm sorry, I think I was looking at the wrong thread. I'm going to try this. It looks awesome, thanks, Kazimuth.
monkstone, I'm also playing with processing.py now. I'm checking your blogs. Thanks for your work.
It seems that the restriction of only accepting files with *.pde extension was unintended see bug filed by Jonathan Feinberg.