我就开门见山了:
import Activities
# File directory should be Activities,Play,Football then the function mcball.
# For example: This doesn't work
Activities.play.football.mcball()
# Activities, play, and football are files. mcball is the function.
# No other assortment works, I tried.
# Even "from ... Import ... as ..." doesn't work
#help
不管用,不知道为什么。
还有,一切都是定制的。“活动”不是我从网上得到的模块。
1条答案
按热度按时间scyqe7ek1#
如果你只对顶层的
Activities
包执行import
操作,内部的模块不会自动加载,除非Activities/__init__.py
文件为你导入它们。默认情况下,它不会做任何事情,所以你需要导入实际的模块,使用:现在您应该能够成功调用
Activities.play.football.mcball()
了。