开发者

Python: would this leave me with a clean environment?

I want to change directories in the python (not ipython) repl under certain circumstances.

If I progra开发者_如何学JAVAmmatically send the following text will I be likely to avoid any name pollution?

import os as prefix_hide_os
prefix_hide_os.chdir("/some/path)
del prefix_hide_os


Just use this

__import__("os").chdir("/some/path")
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜