您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

在IPython启动时自动加载模块

在IPython启动时自动加载模块

我找到了一个解决方案,在您的IPython配置文件目录(认为-.ipython\profile_default)中,使用以下几行来编辑文件ipython_config.pyipython profile create如果不存在,请创建文件):

# loads the root config object
c=get_config()

# executes the line in brackets on program launch
c.InteractiveShellApp.exec_lines = ['from __future__ import division']
python 2022/1/1 18:47:23 有329人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶