Save workspace in IPython

前端 未结 5 1271
无人及你
无人及你 2020-12-13 14:42

Is it possible to save an IPython workspace (defined functions, different kinds of variables, etc) so that it can be loaded later?

This would be a similar function

5条回答
  •  春和景丽
    2020-12-13 15:13

    You can use the dill python package:

    import dill                            
    filepath = 'session.pkl'
    dill.dump_session(filepath) # Save the session
    dill.load_session(filepath) # Load the session
    

    To install it:

    pip install dill
    

提交回复
热议问题