2016-07-07 167 views
2

在我的jupyter筆記本中,括號自動完成,我喜歡。如何打開ipython中括號的自動完成qtconsole

如果我去終端並運行jupyter qtconsole然後我的控制檯打開。它是這個版本:

Jupyter QtConsole 4.2.1 Python 2.7.11 | Anaconda 2.1.0(32位)| (默認,2015年12月6日,18:08:45)輸入「copyright」,「credits」或 「許可證」以獲取更多信息。

IPython 4.2.0 - 增強型交互式Python。

在qtconsole括號中不自動完成 - 不會執行引號。我可以打開它們嗎?

我有以下文件:
/home/myname/.jupyter/custom/custom.js
/home/jason/.ipython/profile_default/static/custom/custom.js

custom.js我有如下 - 我可以添加到這些文件獲取自動完成的行爲嗎?

// leave at least 2 line with only a star on it below, or doc generation fails 
/** 
* 
* 
* Placeholder for custom user javascript 
* mainly to be overridden in profile/static/custom/custom.js 
* This will always be an empty file in IPython 
* 
* User could add any javascript in the `profile/static/custom/custom.js` file 
* (and should create it if it does not exist). 
* It will be executed by the ipython notebook at load time. 
* 
* Same thing with `profile/static/custom/custom.css` to inject custom css into the notebook. 
* 
* Example : 
* 
* Create a custom button in toolbar that execute `%qtconsole` in kernel 
* and hence open a qtconsole attached to the same kernel as the current notebook 
* 
* $([IPython.events]).on('app_initialized.NotebookApp', function(){ 
*  IPython.toolbar.add_buttons_group([ 
*   { 
*     'label' : 'run qtconsole', 
*     'icon' : 'icon-terminal', // select your icon from http://fortawesome.github.io/Font-Awesome/icons 
*     'callback': function() { 
*      IPython.notebook.kernel.execute('%qtconsole') 
*     } 
*   } 
*   // add more button here if needed. 
*   ]); 
* }); 
* 
* Example :autoCloseBrackets: true, 
* 
* Use `jQuery.getScript(url [, success(script, textStatus, jqXHR)]);` 
* to load custom script into the notebook. 
* 
* // to load the metadata ui extension example. 
* $.getScript('/static/notebook/js/celltoolbarpresets/example.js'); 
* // or 
* // to load the metadata ui extension to control slideshow mode/reveal js for nbconvert 
* $.getScript('/static/notebook/js/celltoolbarpresets/slideshow.js'); 
* 
* 
* @module IPython 
* @namespace IPython 
* @class customjs 
* @static 
*/ 

回答

0

我使用這個版本

Jupyter QtConsole 4.3.0 的Python 3.6.1 |蟒蛇4.4.0(64位)| (默認,2017年5月11日,13:25:24)[MSC v.1900 64位(AMD64)]

和自動完成適合我在Windows上工作正常。 嘗試按下標籤,它會顯示你可用的選項,就像linux一樣。

相關問題