简体   繁体   中英

Setting default configuration for Jupyter QtConsole

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

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']

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM