我正在尝试为ipythonqtconsole(v3.0.0)设置一个自定义横幅。在我的概要文件配置中,我设置了c.IPythonWidget.banner = u'Custom Banner'
,然后启动ipython qtconsole --profile=myprof
。我得到的是预先挂在常规横幅上的自定义横幅:
Custom BannerPython 2.7.5 (default, Mar 9 2014, 22:15:05)
Type "copyright", "credits" or "license" for more information.
IPython 3.0.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
%guiref -> A brief reference about the graphical user interface.
IPython profile: myprof
In [1]:
我怎样才能只打印我的横幅
^{pr2}$谢谢。在
这并不理想,但是我可以通过在IPython源代码的
core/usage.py
模块中设置default_gui_banner=""
来抑制默认横幅。如果不修改源代码(这很难看),我无法找到任何方法来实现这一点,因此,如果有人有更好的方法,我会全神贯注地听。在您不希望看到的消息作为内核横幅的一部分打印出来(它从shell中获取)。在使用/连接到其他地方的内核之前,我将shell的
banner1
属性设置为空字符串,从而避免了打印它:我只在ipythonqt中使用过/测试过这个,所以这可能不适用于其他内核。在
相关问题 更多 >
编程相关推荐