![]() |
wxPython syntax error help.
I'm following the getting started tutorial here and when I try adding the OnOpen method I get this syntax error:
:
: python partTwo.py here is the full source code. :
import osI'm running this on Mac OS 10.4.7 with Python 2.4.3 and wxPython 2.6. any and all help is very much appreciated :) thank you. Alvin |
In Python, indentation matters. You must keep the level of all indented blocks the same. You have some lines that are randomly bumped out of place.
Also, you can not add multiple strings together by merely placing one beneath an other. You need to use triple quotes """ to enclose multi-line text. :
"""this is the first line |
the indent is a mistake in my posting it to the forum. this is how the code looks on my screen: image
as for the comments. thats how the comments were on the tutorial, I never touched them. all I'm trying to do is add the OnOpen method as an excerise. |
ok I figured it out! it was the text editor that I'm using. when I opened it in vim I saw the lines that were out of place.
thanks for the help. |
Oh, wow. That multiline literal worked? I never knew you could concact them by simply starting a new literal on the next line... heh.
Glad you figured it out. |
well yeah... with the multi-line literal I can see the whole line if code without having to adjust the size of my text editor... it really helps :D
|
| All times are GMT -5. The time now is 12:22 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC