Re: Non blocking tty I/O

Discussion in 'Python' started by Yun Mao, Aug 14, 2003.

  1. Yun Mao

    Yun Mao Guest

    You may want to use select to test if the bits are available or not.
    http://www.python.org/doc/current/lib/module-select.html

    Yun

    "Mike solem" <> wrote in message
    news:...
    > I'm reading data from the comport on linux, using 'read(1)'. This blocks

    until it gets a byte. How can I get it to not block, so that it doesn't
    hang forever waiting for a byte.
    >
    > Mike
    >
    >
    >
     
    Yun Mao, Aug 14, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hendra Gunawan
    Replies:
    1
    Views:
    12,588
    Allan Herriman
    Apr 8, 2004
  2. Andre Kelmanson

    blocking i/o vs. non blocking i/o (performance)

    Andre Kelmanson, Oct 10, 2003, in forum: C Programming
    Replies:
    3
    Views:
    939
    Valentin Tihomirov
    Oct 12, 2003
  3. nukleus
    Replies:
    14
    Views:
    837
    Chris Uppal
    Jan 22, 2007
  4. Christian
    Replies:
    5
    Views:
    738
    Esmond Pitt
    Dec 2, 2007
  5. Serge Savoie
    Replies:
    4
    Views:
    272
    Serge Savoie
    Oct 1, 2008
Loading...

Share This Page