wp231957 发表于 2022-9-16 16:35:31

Python中有类似PROMPT的函数吗

获取用户输入的 弹窗
var person=prompt("请输入你的名字","Harry Potter");

我不想用tk所以好像导致下面的代码无法运行:
from tkinter.simpledialog import askstring

res = askstring("title", "question", initialvalue=None, parent=None)

print(res)

我的需求就是在控制台下弹出一个窗体能接收用户的输入信息(但是 绝对不要TKqt 一类的)
页: [1]
查看完整版本: Python中有类似PROMPT的函数吗