Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 xonsh 中执行一个 Python 文件,就像%run在 ipython 中一样。特别是,我希望脚本中的所有全局变量在运行文件后都可以在 xonsh 中使用。如何?
%run
由于 xonsh 语言是 Python 语言的严格超集,您可以直接获取它:
source myfile.py