471,119 Members | 1,362 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,119 software developers and data experts.

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

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

Nov 22 '05 #1
5 6096
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

Nov 22 '05 #2
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

Nov 22 '05 #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 ?
Nov 22 '05 #4
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 ?
Nov 22 '05 #5
>>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.

Nov 22 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Pradeep MM | last post: by
5 posts views Thread by Mariame | last post: by
reply views Thread by Petr Jakes | last post: by
1 post views Thread by shalinmangar | last post: by
4 posts views Thread by robert | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.