簡體   English   中英

如何配置IPython 5以使其具有IPython 3的讀取行,制表符補全,(缺少)語法突出顯示等功能? (self.IPython)

[英]How can I configure IPython 5 to have IPython 3's readline, tab-completion, (lack-of) syntax highlighting, etc? (self.IPython)

我知道在某個時候我可能想“升級”,但是現在我只想要舊的外觀和感覺。

我知道IPython是可配置的,但是找到正確的設置並沒有很多運氣。

(順便說一下,這僅是指IPython的交互式終端)

首先創建一個默認的iPython配置文件。 在您的外殼中,鍵入:

$ ipython profile create

假設用戶名為someuser ,則應提供與此類似的輸出:

[ProfileCreate] Generating default config file: u'/home/someuser/.ipython/profile_default/ipython_config.py'

使用上面喜歡的文本編輯器打開新創建的文件,在上面的示例中顯示為: /home/someuser/.ipython/profile_default/ipython_config.py

在底部添加以下行:

c.TerminalInteractiveShell.colors = 'NoColor'
c.TerminalInteractiveShell.display_completions = 'readlinelike'

保存文件。

應該是這樣。 更改應該在新的iPython會話中處於活動狀態。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM