by putting the cursor to the end of the
for c in chartNames:
and pressing an enter I get compile error.
"I get a compile error" is too vague for anyone to figure out. It is probably that the blank line is not indented at the same level as the other lines and your editor does not like that (which is overly picky, but at the discretion of whoever wrote the editor), but as I said it is impossible to decipher without the line number of the error and what it is. Use try/except, especially when testing.
try:
for c in chartNames:
chartUrl = baseChartUrl+c
hd = extractChart(chartUrl)
writeChart(hd,c)
for key in hd:
if key in chart:
chart[key].append(c)
else:
chart[key] = [c]
except:
import traceback
traceback.print_exc()
raise
Last edited by woooee; Jul 1st, 2009 at 2:09 pm.
Reputation Points: 741
Solved Threads: 692
Nearly a Posting Maven
Offline 2,305 posts
since Dec 2006