check if there is data in stdin without blocking

hg hg at nospam.org
Mon Jan 15 03:42:19 EST 2007


hg wrote:

> Hi,
> 
> Is there a way ? ... select ?
> 
> 
> 
> hg
PS:

import sys
import select

l_r = select.select([sys.stdin],[],[],0)

gives me:
  File "select.py", line 2, in ?
    import select
  File "/home/philippe/Desktop/select.py", line 4, in ?
    l_r = select.select([sys.stdin],[],[],0)
TypeError: 'module' object is not callable





More information about the Python-list mailing list