I am starting to learn python and thought this would be an interersting project to do I have entered this and save it as irctest.py
Code:
import irclib
network = 'irc.wirednetwork.org'
port = 6667 # Default Port
channel = '#thevault'
nick = 'vaultbot'
name = 'vaultbot'
irc = irclib.IRC() # Creates the IRC object
server = irc.server() # Creates the Server object
server.connect ( network, port, nick, ircname = name ) # Connects
server.join ( channel ) # Joins the selected channel
irc.process_forever() # Take a guess? A loop. :-)
But nothing seems to happen and when i hit ctr-c to quit i get this
Code:
python irctest.py
Traceback (most recent call last):
File "irctest.py", line 15, in <module>
irc.process_forever() # Take a guess? A loop. :-)
File "/usr/lib/python2.5/site-packages/irclib.py", line 229, in process_forever
self.process_once(timeout)
File "/usr/lib/python2.5/site-packages/irclib.py", line 213, in process_once
(i, o, e) = select.select(sockets, [], [], timeout)
KeyboardInterrupt
I found several tutorials using this code and in different ways and have tried several of them but they dont work. Am i screwing up syntax somewhere possibly ? Any ideas ? Thanks