Here's a puzzle...
thedustbustr at aol.com
Sun Jul 22 01:56:40 CEST 2001
I'm trying to split the following string called data into four variables:
:Angel PRIVMSG Wiz :here is my message!
(so data=':Angel PRIVMSG Wiz :here is my message!') with an outcome of:
message='here is my message!'
Unless my logic is flawed, this should return 'PRIVMSG':
print data[len(sender)+2:string.find(data[len(sender)+2:],' ')]
It prints '' (an empty string). Is my logic flawed, or does Python dislike a
string splice determined by a function?
And if you are up to it, feel free to help me splice (correct terminology,
parse?) for variables rcpt and message ;)
Many thanks, Dustin
More information about the Python-list