如何解决使用 input() 函数通过 python 脚本在 Power BI 中弹出
我们正在尝试使用 python input() 函数在 POWER BI 中获取弹出窗口,用户可以在其中提供输入,然后脚本将加载特定业务部门的数据。
预先感谢您的建议和帮助。
解决方法
如果您想要弹出窗口,可以使用内置的 tkinter 库 simpledialog 模块。
这是一个最小的例子:
import tkinter
from tkinter import simpledialog
root = tkinter.Tk()
# hide the root window because we only want to show dialogs
root.withdraw()
value = simpledialog.askinteger("My Title","Enter an integer")
print(f"Value entered {value}")
这将显示如下所示的弹出窗口:
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。