python - 如何从 easygui.enterbox 收集字符串

标签 python string easygui

喜欢

Enter = easygui.enterbox
print(Enter.text)

我不知道该怎么做。什么字符串名称形成 easygui.enterbox?

最佳答案

enterbox 是一个函数,引用自tutorial :

enterbox(msg='Enter something.', title=' ', default='', strip=True)

Show a box in which a user can enter some text. You may optionally specify some default text, which will appear in the enterbox when it is displayed.

Returns the text that the user entered, or None if he cancels the operation.

例子:

import easygui

value = easygui.enterbox()
print(value)

希望对您有所帮助。

关于python - 如何从 easygui.enterbox 收集字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22188128/

相关文章:

python - opencv python在存在间隙的表中添加网格线

python - 如何将excel数据解析成特定格式的数据框?

Python 打包的 EXE 空白屏幕在 Windows 上一秒钟如何停止?

python - 如何让easygui过滤文件列表

python-3.x - Python EasyGUI 模块 : how to change the font

python - Python 的 PCRE 正则表达式 (*COMMIT) 等效项

python - 无法使用 psutil.Process()

c++ - 如何创建字符串表

string - 如何在 VBScript 中使用 2 个变量作为 InStr 函数

c - 在句子(具有多个单词)中查找多单词字符串(关键字)的优化算法或方法?