[英]Python Warning: Input is not a terminal (fd=0)
I'm trying to create a terminal-based application in Python 3 that is executed within another program (clion).我正在尝试在 Python 3 中创建一个基于终端的应用程序,该应用程序在另一个程序(clion)中执行。
At first I was using prompt-toolkit
, but simple input
does the same.起初我使用的是
prompt-toolkit
,但简单的input
也是如此。 Every time I run the application within the other program the following error comes up:每次我在另一个程序中运行应用程序时,都会出现以下错误:
Warning: Input is not a terminal (fd=0).
Is there another way to get the input from python?还有其他方法可以从 python 获取输入吗?
Thanks谢谢
You could use Python curses , a cool lib that let you interact directly with the terminal.您可以使用Python curses ,这是一个很酷的库,可让您直接与终端交互。 I don't know if your project requires this much of low-level but you could give it a try.
我不知道您的项目是否需要这么多低级,但您可以尝试一下。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.