Fedora Linux Support Community & Resources Center
Old 25th February 2008, 05:38 PM
LostSon Offline
Registered User
Join Date: Mar 2005
Location: Wisconsin
Posts: 94
python and python-irclib problem

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

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

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
  File "/usr/lib/python2.5/site-packages/irclib.py", line 213, in process_once
    (i, o, e) = select.select(sockets, [], [], timeout)
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
Adopt a unanswered post today!
Reply With Quote
Old 25th February 2008, 06:50 PM
dshaw256 Offline
Registered User
Join Date: Mar 2006
Location: Virginia
Age: 63
Posts: 246
What is it supposed to be doing? Looks like it went through all your connect code and is now in your process forever loop... So maybe there's nothing for it to process?

I went Googling and found a thread on this very subject. You might find it interesting.

Dave Shaw
Registered Linux user #412525
Dell Latitude D610 / FC13

no problem is so bad that a moron with root can't make it much worse
Reply With Quote
Old 25th February 2008, 08:19 PM
LostSon Offline
Registered User
Join Date: Mar 2005
Location: Wisconsin
Posts: 94
ok I have figured out it is trying to join the channel too fast and this is the only network it is havin problems with. So is there a way to put some kind of delay in there say 30 seconds or so before it tries to join the channel ?
Adopt a unanswered post today!
Reply With Quote
Old 7th March 2008, 12:12 AM
rantanplan Offline
Registered User
Join Date: Oct 2004
Location: Germany
Age: 46
Posts: 125
I think there is a wait or sleep function. Google it in the module documentation online at the python site.
No bugs, no hugs, no virus, no spiritus. :rolleyes:
Reply With Quote

problem, python, pythonirclib

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python, IDLE, Python-tools Gnome. Deonis Using Fedora 2 12th March 2009 03:44 AM
problem with python ZioM Using Fedora 1 15th April 2007 02:01 PM
Processing Conflict: python-devel conflicts python< 2.3.4-13.1 guarriman Using Fedora 0 15th September 2005 05:53 PM
/etc/cron.daily/yum.cron: Error: python-devel conflicts with python < 2.3.4-13.1 productive Servers & Networking 0 20th April 2005 08:51 PM

Current GMT-time: 10:14 (Wednesday, 23-08-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat