[Tutor] GUI new project
Luke Paireepinart
rabidpoobear at gmail.com
Mon Oct 23 07:32:11 CEST 2006
johnf wrote:
> On Sunday 22 October 2006 20:03, Luke Paireepinart wrote:
>
>>> """Create the Second ListBox"""
>>>
>>> self.lbRSSItems = Listbox(self, exportselection=0
>>> ,command=self.reveal
>>> , relief=SUNKEN)
>>>
>> Because whitespace is important in python,
>> you can't arbitrarily put newlines into your text.
>> Your program is getting confused because it doesn't know what ',
>> relief=SUNKEN)' means.
>> Try putting a '\' before your newlines.
>> Like:
>> x = \
>> 'a'
>>
>>
>> HTH,
>> -Luke
>>
> I'm not an expert Luke but I thought a statement can take more than one line
> when enclosed in parentheses, square brackets or braces (also when triple
> quoted). Is this correct????
>
Yep, yep.
I confess, I didn't look too closely at that, and I guess I heard one
should use backslashes whenever a command goes to a new line,
and I assumed it was always true, and never tried without them!
You're right, of course, John, and I apologize to the OP. Alan had the
correct answer to the problem.
Listboxes don't take a command argument.
Hope that helps!
-Luke
More information about the Tutor
mailing list