SyntaxError: multiple statements found while compi

2019-01-29 09:16发布

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条回答
男人必须洒脱
2楼-- · 2019-01-29 09:41

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.

查看更多
登录 后发表回答