Skip to content Skip to sidebar Skip to footer

How To Disable Ipython Prompt Blinking

I recently downloaded the anaconda pkg and installed it in a redhat system with Python 2.7.13 :: Anaconda 4.3.1 (64-bit) When I run the ipython prompt it always keep blinking fo

Solution 1:

IPython has a notion of profiles to allow for different kinds of configurations. If this is news to you, you've probably just been using the default profile and not known it. In the shell, run the ipython profile create command to be sure (don't worry, if you alreay have a profile, this won't overwrite it). Now ipython locate profile will tell you the directory which contains all of the configuration for the default profile.

In [1]: !ipython profile create

In [2]: !ipython locate profile

/home/pi/.ipython/profile_default

In [3]: x = !ipython locate profile

In [4]: cd $x.s

/home/pi/.ipython/profile_default

In [5]: ls

There's a lot of stuff there, but we just need to add our one line to the end of the file in static/custom/custom.js

In [6]: cd static/custom/

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

In [7]: ls

custom.css custom.js

In [8]: !echo "codemirror.defaults.cursorblinkrate=0" >> custom.js

or if you say "I want it all and I want it now!"

You say you don't want to save your current notebook and reload it to get the updated CodeMirror settings? You just want all cells in the current notebook to change their behavior? Well, OK, Freddie:

In [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;

Post a Comment for "How To Disable Ipython Prompt Blinking"