简体   繁体   English

为什么能够导入不存在的模块?

[英]Why it is able to import a module that does not exist?

A core.py file doesn't exist in the file folder named QtRec. 名为QtRec的文件夹中没有core.py文件。 But the author uses 但是作者使用

QtRec.core._QApp_running = True

How can that work. 那怎么工作 The example file is on github , created by radjkarl. 示例文件在github上 ,由radjkarl创建。

Another question is that I can't install the setup.py file. 另一个问题是我无法安装setup.py文件。 TypeError: 'module' object is not callable. TypeError:“模块”对象不可调用。 How can I do. 我能怎么做。

core__init__.py文件中定义:请参见代码

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM