Xlib in Python? I need XDrawString()

2005-02-26 Thread Artificial Life
All I really want is to write a few strings to the background of my X
display. XDrawString() is what I need. The Xlib for Python shows it's out
dated. Is there any alternative? 

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: sockets question

2005-02-25 Thread Artificial Life
On Sat, 26 Feb 2005 00:35:57 -0500, Mohammed Smadi wrote:

 hi;
 
 i have the following piece of code:
 =
 s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
 s.bind((,port))
 s.sendto(data,(MY_GW,port)) 
 data = s.recvfrom(1024)  
 
 
 data contains some instructions which i am sending to MY_GW.  If the 
 reply arrives from the MY_GW quickly then things fine, otherwise the 
 program is going to freeze waiting for the reply.  I want to do the 
 following:
 
 1- Be able to impose a timeout after which i want to stop executing 
 the s.recvfrom statement.
 
 rgds;
 m.smadi


That happens because those functions 'block.' Search for Non-blocking
sockets, and the 'select' module

-- 
http://mail.python.org/mailman/listinfo/python-list