Fedora Linux Support Community & Resources Center
  #1  
Old 25th February 2008, 04: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

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
__________________
Adopt a unanswered post today!
Reply With Quote
  #2  
Old 25th February 2008, 05:50 PM
dshaw256 Offline
Registered User
 
Join Date: Mar 2006
Location: Virginia
Age: 60
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.

http://www.thescripts.com/forum/thread689988.html
__________________
Dave Shaw
Registered Linux user #412525
Dell Latitude D610 / FC13
dshaw256@centurylink.net

no problem is so bad that a moron with root can't make it much worse
Reply With Quote
  #3  
Old 25th February 2008, 07: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
  #4  
Old 6th March 2008, 11:12 PM
rantanplan Offline
Registered User
 
Join Date: Oct 2004
Location: Germany
Age: 43
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
Reply

Tags
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: 13:50 (Tuesday, 30-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

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