Start ipython running a script

后端 未结 7 936
暖寄归人
暖寄归人 2020-12-08 19:09

My use case is I want to initialize some functions in a file and then start up ipython with those functions defined. Is there any way to do something like

i         


        
相关标签:
7条回答
  • 2020-12-08 19:35

    In recent versions of ipython you do need to add the -i option to get into the interactive environment afterwards. Without the -i it just runs the code in myfile.py and returns to the prompt.

    $ ipython -i myfile.py
    
    0 讨论(0)
提交回复
热议问题