溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

使jupyter可以自動補全的方法

發(fā)布時間:2020-07-28 11:59:31 來源:億速云 閱讀:279 作者:清晨 欄目:編程語言

小編給大家分享一下使jupyter可以自動補全的方法,希望大家閱讀完這篇文章后大所收獲,下面讓我們一起去探討吧!

使jupyter可以自動補全的方法:

Jupyter notebook使用默認的自動補全是關掉的。要打開自動補全,需修改默認配置。

ipython profile create

以上命令會在~/.ipython/profile_default/目錄下生成ipython_config.py和ipython_kernel_config.py
我們需要修改的以下幾行:

## Activate greedy completion PENDING DEPRECTION. this is now mostly taken care
#  of with Jedi.
#
#  This will enable completion on elements of lists, results of function calls,
#  etc., but can be unsafe because the code is actually evaluated on TAB.
c.Completer.greedy = True

## Experimental: restrict time (in milliseconds) during which Jedi can compute
#  types. Set to 0 to stop computing types. Non-zero value lower than 100ms may
#  hurt performance by preventing jedi to build its cache.
c.Completer.jedi_compute_type_timeout = 400

## Experimental: Use Jedi to generate autocompletions. Off by default.
c.Completer.use_jedi = True

重啟jupyter后生效。

看完了這篇文章,相信你對使jupyter可以自動補全的方法有了一定的了解,想了解更多相關知識,歡迎關注億速云行業(yè)資訊頻道,感謝各位的閱讀!

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內(nèi)容。

AI