[Tutor] little problem...
Georges Gabereau
georges@acbm.qc.ca
Tue, 5 Dec 2000 22:29:24 -0500
thanks.
I am now using raw_input() and it works the way I expect.
Does anybody have any experince with irclib.py?
http://joel.rosdahl.net/hacks/#irclib
Georges
-----Original Message-----
From: D-Man [mailto:dsh8290@rit.edu]
Sent: December 5, 2000 10:26 PM
To: Georges Gabereau
Cc: tutor@python.org
Subject: Re: [Tutor] little problem...
Just a guess, but you probably want to use raw_input, not input. The
traceback
you have shows that the call to the 'input' funcion failed. I haven't
checked
the docs, but it seems that it reads python code, thus the "syntax error" in
your input.
-D
On Tue, 05 Dec 2000 21:21:53 Georges Gabereau wrote:
| 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
|
| _______________________________________________
| Tutor maillist - Tutor@python.org
| http://www.python.org/mailman/listinfo/tutor
|