Re: [Tutor] converting processing code to python code

2008-12-01 Thread Alan Gauld
"Erica Osher" <[EMAIL PROTECTED]> wrote I wrote the original code in a program called Processing. ( http://processing.org/) Having had a look at the web site it is obvious that the hardest bit of porting the Processing code to Python is that Python does not support all the visual drawing func

Re: [Tutor] converting processing code to python code

2008-12-01 Thread Alan Gauld
"Erica Osher" <[EMAIL PROTECTED]> wrote I wrote the original code in a program called Processing. ( http://processing.org/) Aha! The language is actually called Processing. Now that's a new one on me. Thanks for the link, it does help to have the context. :-) Now the next question, are y

Re: [Tutor] converting processing code to python code

2008-12-01 Thread Erica Osher
I wrote the original code in a program called Processing. ( http://processing.org/) Thanks for your advice, I definitely need some tutorials. On Mon, Dec 1, 2008 at 8:23 PM, Alan Gauld <[EMAIL PROTECTED]>wrote: > "Erica Osher" <[EMAIL PROTECTED]> wrote > > The code was originally created for a

Re: [Tutor] converting processing code to python code

2008-12-01 Thread Alan Gauld
"Erica Osher" <[EMAIL PROTECTED]> wrote The code was originally created for a Processing Project and I'm just starting to learn python and I'd like to build on this code. The fact that you still don't tell us what the original language is suggests you are not a very experienced programmer i

Re: [Tutor] converting processing code to python code

2008-12-01 Thread Steve Willoughby
On Mon, Dec 01, 2008 at 06:40:03PM -0500, Erica Osher wrote: > The code was originally created for a Processing Project and I'm just > starting to learn python and I'd like to build on this code. > > The syntax error I get is > > *Traceback (most recent call last): > File "nodebox/gui/mac/__ini

Re: [Tutor] converting processing code to python code

2008-12-01 Thread Erica Osher
The code was originally created for a Processing Project and I'm just starting to learn python and I'd like to build on this code. The syntax error I get is *Traceback (most recent call last): File "nodebox/gui/mac/__init__.pyo", line 332, in _compileScript File "", line 8 int x1 = 5;

Re: [Tutor] converting processing code to python code

2008-12-01 Thread Alan Gauld
"Erica Osher" <[EMAIL PROTECTED]> wrote I have a simple processing code that I'm trying to work with in python, but I keep getting syntax errors. Any help on changing the code would be greatly appreciated. Thanks. It would help to have some background. What language are you translating from

Re: [Tutor] converting processing code to python code

2008-12-01 Thread Steve Willoughby
On Mon, Dec 01, 2008 at 12:59:23PM -0800, Steve Willoughby wrote: > > void drawSquare1() { > > if(x1<0 || x1>width-size) { > > x1Speed = -x1Speed; > > } > > > > if(y1<0 || y1>height-size) { > > y1Speed = -y1Speed; > > } > > def drawSquare1(): > if (x1 < 0 or x1 > width-size): > x1 +

Re: [Tutor] converting processing code to python code

2008-12-01 Thread Steve Willoughby
On Mon, Dec 01, 2008 at 03:48:59PM -0500, Erica Osher wrote: > I have a simple processing code that I'm trying to work with in python, but > I keep getting syntax errors. Any help on changing the code would be greatly > appreciated. Thanks. Could you show us what you have so far in Python and what

[Tutor] converting processing code to python code

2008-12-01 Thread Erica Osher
I have a simple processing code that I'm trying to work with in python, but I keep getting syntax errors. Any help on changing the code would be greatly appreciated. Thanks. void setup() { size(550, 500); noStroke(); smooth(); fill(255, 255, 255, 150); } //Square 1 vars int x1 = 5; int y1 =