且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Python中,如何在不更改命名空间的情况下将一个文件包含(而不导入)在另一个文件中(宏样式)?

更新时间:2023-09-21 16:54:10

这可以通过 execfile() ,但是您应该考虑为此使用其他一些机制,例如多态性或插件.

This can be done with execfile(), but you should consider using some other mechanism for this instead such as polymorphism or plugins.