def _run_interactive_shell():
"""Run an interactive shell as if it were the first thing being
run.
"""
builtins = __builtins__
code_ = code
import __main__
__main__.__dict__.clear()
__main__.__dict__.update(dict(
__name__ = "__main__",
# normal interactive shell leaves this undefined
# __file__ = None,
__builtins__ = builtins
))
code_.interact()
评论列表
文章目录