In Python, how can I include (not import) one file within another file, macro style, without changing namespace?

前端 未结 1 393
青春惊慌失措
青春惊慌失措 2021-01-23 01:38

First I do know about \'import\'. When I try \'import\' it doesn\'t work. What I\'m trying to do is split a single module into two parts, one of which is editable by a group a

相关标签:
1条回答
  • 2021-01-23 02:09

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

    0 讨论(0)
提交回复
热议问题