In Scott Montreuil
writes:
> I have an if statement which seems to run both commands and I cannot
> figure out why.
I'm not sure what you mean by "both commands". Do you mean that the
'if' and 'else' branches both execute?
Your if/else branches are in a loop, so perhaps you're seeing the 'if
Scott Montreuil wrote:
> I have an if statement which seems to run both commands and I cannot
> figure out why. (just learning so I may be missing something obvious) Any
> ideas?
Use a Python IDE and debugger. I recommend PyDev, but YMMV.
> while True:
> global latit,longt,jlatit,jlongt
Hi,
I have an if statement which seems to run both commands and I cannot figure out
why. (just learning so I may be missing something obvious) Any ideas?
while True:
global latit,longt,jlatit,jlongt,mlongt,mlatit
response = urllib.urlopen(url)
data = json.loads(response.r