termios.tcgetattr(fd) error: (22, 'Invalid argument')

Discussion in 'Python' started by Petr Jakes, Nov 19, 2005.

  1. Petr Jakes

    Petr Jakes Guest

    On my box (Fedora Core4, Python 2.4.1) I am getting following error:
    >>> import termios, sys
    >>> fd = sys.stdin.fileno()
    >>> oldSettings = termios.tcgetattr(fd)

    Traceback (innermost last):
    File "<stdin>", line 1, in ?
    error: (22, 'Invalid argument')

    Thanks for your comments.
    Petr Jakes
     
    Petr Jakes, Nov 19, 2005
    #1
    1. Advertising

  2. Petr Jakes

    Petr Jakes Guest

    To provide some feedback:
    As Grant Edwards posted in this list, I was running my code inside of
    IDE that replaces sys.stdin with some other. While running the program
    from a shell prompt, everything goes fine.
    Petr Jakes
     
    Petr Jakes, Nov 19, 2005
    #2
    1. Advertising

  3. Petr Jakes wrote:

    >To provide some feedback:
    >As Grant Edwards posted in this list, I was running my code inside of
    >IDE that replaces sys.stdin with some other. While running the program
    >from a shell prompt, everything goes fine.
    >Petr Jakes
    >
    >
    >

    have you tried it with root account ?
     
    Sinan Nalkaya, Nov 21, 2005
    #3
  4. Petr Jakes

    Petr Guest

    Re[2]: termios.tcgetattr(fd) error: (22, 'Invalid argument')

    >>To provide some feedback:
    >>As Grant Edwards posted in this list, I was running my code inside of
    >>IDE that replaces sys.stdin with some other. While running the program
    >>from a shell prompt, everything goes fine.
    >>Petr Jakes
    >>
    >>
    >>

    SN> have you tried it with root account ?
    Yes, I did. The problem was the IDE. Without IDE the filedescriptor
    and its flags settings are working flawlessly.
     
    Petr, Nov 21, 2005
    #4
    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. Java Guy
    Replies:
    1
    Views:
    691
    Manish Pandit
    Oct 15, 2006
  2. Laszlo Nagy
    Replies:
    0
    Views:
    743
    Laszlo Nagy
    May 31, 2007
  3. x1
    Replies:
    0
    Views:
    376
  4. Une Bévue
    Replies:
    0
    Views:
    532
    Une Bévue
    Sep 7, 2008
  5. Java Guy
    Replies:
    1
    Views:
    319
Loading...

Share This Page