相关疑难解决方法(0)

在Python中读取单个字符(getch样式)在Unix中不起作用

任何时候我在http://code.activestate.com/recipes/134892/上使用该配方我似乎无法使其正常工作.它总是抛出以下错误:

Traceback (most recent call last):
    ...
    old_settings = termios.tcgetattr(fd)
termios.error: (22, 'Invalid argument)
Run Code Online (Sandbox Code Playgroud)

我最好的想法是,因为我在Eclipse中运行它所以termios正在抛出关于文件描述符的东西.

python getch

4
推荐指数
2
解决办法
8804
查看次数

标签 统计

getch ×1

python ×1