[Tutor] Fwd: Re: Need Help Modifying a wxPython GUI (scrolling display and logging)
Steven D'Aprano
steve at pearwood.info
Fri Jun 14 15:53:27 CEST 2013
On 14/06/13 22:45, Matt D wrote:
> tmplist = []
> tmplist.append((str(strftime("%Y-%m-%d %H:%M:%S", localtime())))
> tmplist.append(field_values["nac"])
[...]
>
> When i run the code program dies like this:
>
> tmplist.append(field_values["nac"])
> ^
> SyntaxError: invalid syntax
>
> I cant figure why it stops on the third line above? Anyone have an idea?
When you get a syntax error, sometimes the actual problem occurs on the PREVIOUS line, but isn't detected until this line.
Go back to the previous line, the one containing strftime, and match up each pair of round brackets. How many Open brackets ( do you count? How many Close brackets ) do you count?
--
Steven
More information about the Tutor
mailing list