[Tutor] little problem...

Georges Gabereau georges@acbm.qc.ca
Tue, 5 Dec 2000 21:21:53 -0500


Hey,

This is my first post, go easy on me... :)

I cannot figure out why this code does not work.

command = input("irc>")
command = string.split(command, ":", 5)
newtext = command[1]
print newtext

If I enter "test:input", no quotes, it returns:

Traceback (most recent call last):
  File "C:\Python2.0\Georges\IRCtest\client.py", line 38, in ?
    command = input("irc>")
  File "<string>", line 1
    test:input
        ^   
SyntaxError: invalid syntax

What's wrong? Shouldn't it split my input at the : and print "input"?

Thanks,

Georges