python-3.x - 在不按 Enter Python 3 的情况下接收用户的输入
问题描述
我想接收来自用户的输入,而不必在 python 3 中按回车键。我见过人们使用“getch”,但我需要能够在 shell 中运行它,而 getch 似乎也不起作用顺利进行。我需要的是这样的:
myVariable = raw_input() #raw input isn't in python 3, hence the problem
解决方案
推荐阅读
- junit - 在 Junit 和 Mockito 中模拟 WCMUsePojo 的 getProperties()
- android - Android Studio 3.2 生成的java
- python - 在以某种格式获取输入并将其以所需格式存储在 python 中时存在错误
- javascript - 为什么删除文本后无法通过jquery设置输入文本的值?
- android - 当我从片段中按下按钮时如何从 MainActivity 启动媒体播放器
- spring-boot - Spring boot rest api Url 未与 sucees 控制台映射
- c# - 如何使用 C# .net 向 Azure 聊天机器人添加主动学习
- c - C 语言:使用 else-if 语法计算线性系统解时的“Else without a previous if”
- python-3.x - Python3-调用什么变量
- h2o - 我们能看到 DriverlessAI 使用的算法列表吗?