如何连接main.py和gui.py我如何连接这个

问题描述 投票:0回答:2

我有 main.py 和 gui.py 如何连接这些文件来收集 请朋友帮忙


**请朋友帮忙 请朋友帮忙

请朋友帮忙

请朋友帮忙

请朋友帮忙

请朋友帮忙

请朋友帮忙

请朋友帮忙

请朋友帮忙

请朋友帮忙

请朋友帮忙

请朋友帮忙

请朋友帮忙

请朋友帮忙

请朋友帮忙

请朋友帮忙

请朋友帮忙

请朋友帮忙

请朋友帮忙

请朋友帮忙*****

python python-3.x user-interface
2个回答
0
投票

同样的问题,兄弟,请告诉大家如何解决它


0
投票

欢迎来到 Stack Overflow!我不知道你的文件是什么样的,但我可以帮助你连接 2 个 python 文件。为此,您需要在代码中添加

import
语句。例如:

import gui
# Access the variable x in gui.py
print(gui.x)

# Use the function foo in gui.py
gui.foo()

下次,请务必包含代码片段并为您的问题添加详细信息。

© www.soinside.com 2019 - 2024. All rights reserved.