0

this is my code, super simple:

#borders of the bbox
longmax = 15.418483 #longitude top right
longmin = 4.953142 #longitude top left
latmax = 54.869808 #latitude top 
latmin = 47.236219 #latitude bottom

#longitude
longstep = longmax - longmin 
longstepx = longstep / 1000 #longitudal steps the model shall perfom


#latitude
latstep = latmax - longmin
latstepx = latstep / 1000 #latitudal steps the model shall perform

I try to run in it in the Python IDLE (python 3.3) and this errormessage occurs

SyntaxError: multiple statements found while compiling a single statement

Removing the "#" it works just fine.

Whats wrong?!

1
  • do yourself a favour, install and use ipython. Commented Jul 5, 2014 at 19:36

1 Answer 1

1

IDLE can only do a single statement at once, i.e. in your case: A single line. So you have to paste in all lines individually and execute them.

Sign up to request clarification or add additional context in comments.

7 Comments

Aiii. How bad. alright, thank you... Any idea why the Shell "Vico" cant run it neither?
Most REPLs can only process a single statement at once—since they are built to give you immediate feedback for every statement. You can however open the editor in IDLE (File / New File) and put in your code there.
I work in another shell then the python 3.3 IDLE and I copied and pasted it into the python idle. thats the problem
@Christian OP tried to paste in the whole code at once in IDLE, trying to execute multiple statements at once.
@ poke: I am very new to python. I create a new file in the IDL, copied and pasted my code in there. But how do I run it. When I go on "run" in my bar on top (working on a mac here) it opens another windows.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.