首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何打开ipython qtconsole中括号的自动完成

如何打开ipython qtconsole中括号的自动完成
EN

Stack Overflow用户
提问于 2016-07-07 17:59:07
回答 1查看 1.9K关注 0票数 4

在我的jupyter笔记本,括号自动完成,我喜欢。

如果我到终端运行jupyter qtconsole,那么我的控制台就会打开。就是这个版本:

QtConsole 4.2.1Python2.7.11\x Anaconda 2.1.0 (32位)x(缺省值,2015年12月6日,18:08:45)键入“版权”、“信用”或“许可”以获取更多信息。 IPython 4.2.0 --一个增强的交互式Python。

在qtconsole括号中,不要自动完成--引号也不自动完成。我能把它们打开吗?

我有以下文件:

/home/myname/.jupyter/custom/custom.js

/home/jason/.ipython/profile_default/static/custom/custom.js

custom.js中,我有以下内容-我可以添加到这些文件中以获得自动完成的行为吗?

代码语言:javascript
复制
// 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
 */
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-08-27 19:14:53

我正在使用这个版本

朱庇特QtConsole 4.3.0 Python3.6.1 x Anaconda 4.4.0 ( 64位)x(默认,2017年5月11日,13:25:24) MSC v.1900 64位(AMD64)

在窗户上自动完成工作对我来说很好。尝试按下选项卡,它将显示可用的选项,就像linux一样。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38252268

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档