无法在 ipython qtconsole 中更改字体大小

Nic*_*ick 3 ipython

我尝试ipython qtconsole参考stackoverflow中的这个答案来更改字体大小;但是,无论我如何更改 .txt 文件,字体大小都拒绝更改~/.ipython/profile_default/ipython_config.py

\n\n
\xe2\x9e\x9c  ~  ipython profile locate\n/home/nick/.ipython/profile_default\n\n\xe2\x9e\x9c  ~  head .ipython/profile_default/ipython_config.py \n# Configuration file for ipython.\nc = get_config()    \nc.IPythonWidget.font_size = 16\nc.IPythonWidget.font_family = \'Source Code Pro\'\n\n\xe2\x9e\x9c  ~  uname -a\nLinux nick-thinkpad 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:13:28 CET 2015 x86\n_64 GNU/Linux                                                                  \n\n\xe2\x9e\x9c  ~  ipython --version\n4.0.0\n
Run Code Online (Sandbox Code Playgroud)\n\n

令我惊讶的是,ipython qtconsole --ConsoleWidget.font_size=16有效。我的配置有什么问题吗?

\n

Fab*_*ost 5

从版本 4.0 开始ipython qtconsole已弃用(因为split 很大)。相反,使用jupyter qtconsole. c.ConsoleWidget.font_size = 12您可以通过添加来设置字体大小~/.jupyter/jupyter_qtconsole_config.py(这也设置了字体大小ipython qtconsole)。请注意jupyter 中的一个错误,该错误不允许您自动创建默认配置文件。目前,您只需手动创建该文件。