IPython: Increase the number of lines that can be scrolled back in the IPython pane

(Updated November 3, 2014 mentioning Canopy 1.5 Preference option.)

To increase the length of your ipython (qtconsole) buffer

In Canopy 1.5 and above, this can be configured from the Canopy Preferences dialog (Python tab).

Canopy's IPython panel is an IPython QtConsole.

By default, QtConsole's scrollback buffer only holds the most recent 500 lines. This can be increased as follows:

1. As described in this section of the IPython documentation, locate the IPython configuration directory. By default, it is located here:

On Windows Vista, 7, or 8:

C:\Users\<user name>\.ipython

On OS X or Linux:

~/.ipython

2. Locate the "profile_default" subdirectory of the IPython configuration directory. If it doesn't exist, create it by typing the following command at a Windows Command Prompt or OSX/Linux Terminal window:

ipython profile create 

3. Look for the file "ipython_config.py". If it does not already exist, create it as just described.

4. Edit this file, and add the following line to the end:

c.IPythonWidget.buffer_size=1000 (or whatever number you prefer).

 

Have more questions? Submit a request

Comments

  • Avatar
    Chace Ashcraft

    So I looked around for the ipython_config.py file, and I found 4 of them. In my profile directory, there is a math file, a pysh file, a sympy file, and a cluster file. Each one has an ipython.config.py file. Which one do I edit? Or do I edit all of them? Plus, where is the best place to open them for editing? Thanks!

  • Avatar
    Rodrigo Felicio

    How can one possibly change the background or the colorscheme used by Canopy's editor? It seems to override all of my options located in ~/.ipython

  • Avatar
    Jonathan March

    @Rodrigo. Sorry, at present there is very limited support for this -- no color configuration for the text editor, and only 3 choices for the python pane (Preferences/Python). The Canopy GUI application is not targeted at professional programmers who may be passionate about fine points of editor tweaking, but at scientists, engineers, and analysts for whom that is usually less of an issue.

  • Avatar
    Rodrigo Felicio

    @Jonathan.  Thanks for letting me know.  I am not a professional programer, but a scientist that found in Ipython and Canopy a really nice work environment.. Unfortunately spending hours staring at  Canopy's editor bright background is not something that my eyes can take. I would really appreciate if in the future, using dark colorshcemes, like vim's desert scheme, inside Canopy's editor. Anyway, I just like to add that I really enjoy EPD.

     

    cheers

  • Avatar
    Jonathan March

    @Rodrigo It's definitely on the (long) wishlist!

Powered by Zendesk