Setting default configuration for Jupyter QtConsole

末鹿安然 提交于 2021-01-28 19:48:39

问题


I have Jupyter QtConsole installed in Ubuntu 16.04. How can I set default configuration like font family, size and initial imports?


回答1:


The docs on configuration options for jupyter will be very helpful here.

In short, open ~/.jupyter/jupyter_qtconsole_config.py in your favorite text editor and find your options of interest.

  • Font family : c.ConsoleWidget.font_family
  • Font size : c.ConsoleWidget.font_size

Startup scripts and initial imports will be a little more complicated since those are properties of the ipython kernel, which will need to be set in your ipython config. In ~/.ipython/profile_default/ipython_kernel_config.py,

  • Initial imports : c.InteractiveShellApp.exec_lines = ['import numpy as np','import pandas as pd']


来源:https://stackoverflow.com/questions/37036520/setting-default-configuration-for-jupyter-qtconsole

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!