sockets and classes

Steve Holden sholden at holdenweb.com
Wed Aug 1 15:23:09 EDT 2001


"TheDustbustr" <thedustbustr at aol.com> wrote in message
news:20010801143653.04329.00000760 at mb-mh.aol.com...
> I did not include the code to read from the socket in my post to make the
code
> more readable, but it was there.  And it was recieving data, i accidently
had
> deleted the 'print data' statement :P
>
> New problem:  I get the following error:
>      if arg[0] == 'privmsg':
> TypeError: unsubscriptable object
> Whats that supposed to mean?
>
It probably means that neither of the conditions in your parse() method is
true, and so parse() is returning None by default, which you don't appear to
be testing for. if ... elif ... doesn't execute ANY code at all if both the
first and second conditions are false.

Sorry, I don't have time to read the code further just now.

regards
 Steve
--
http://www.holdenweb.com/






More information about the Python-list mailing list