如何禁用ipython提示闪烁

时间:2017-04-04 04:03:07

标签: python ipython

我最近下载了 anaconda pkg并将其安装在带有

的redhat系统中
  

Python 2.7.13 :: Anaconda 4.3.1(64位)

当我运行 ipython 提示时,它始终会为输入行闪烁。无论如何要禁用它吗?

如果有人能提供描述性指示,我将不胜感激,因为我对此不熟悉。

此致 因迪卡。

1 个答案:

答案 0 :(得分:0)

IPython有一个配置文件的概念,允许不同类型的配置。如果这对您来说是新闻,您可能只是使用默认配置文件而不知道它。在shell中,运行ipython profile create命令以确保(不用担心,如果你有一个配置文件,这不会覆盖它)。现在,ipython locate profile将告诉您包含默认配置文件的所有配置的目录。

在[1]中:!ipython profile create

在[2]中:!ipython找到个人资料

/home/pi/.ipython/profile_default

在[3]中:x =!ipython定位配置文件

在[4]中:cd $ x.s

/home/pi/.ipython/profile_default

在[5]中:ls

那里有很多东西,但我们只需要在static / custom / custom.js中将我们的一行添加到文件的末尾

在[6]中:cd static / custom /

/home/pi/.ipython/profile_default/static/custom

在[7]中:ls

custom.css custom.js

在[8]中:!echo“codemirror.defaults.cursorblinkrate = 0”>> custom.js

或者如果你说 “我想要一切,我现在想要它!”

您说您不想保存当前的笔记本并重新加载它以获取更新的CodeMirror设置吗?您只是希望当前笔记本中的所有单元格都改变其行为?嗯,好的,弗雷迪:

在[9]中:        %%的JavaScript

   var rate = 0;
   // apply setting to  all current CodeMirror instances
   IPython.notebook.get_cells().map(
       function(c) {  return c.code_mirror.options.cursorBlinkRate=rate;  }
   );

   // make sure new CodeMirror instance also use this setting
   CodeMirror.defaults.cursorBlinkRate=rate;
相关问题