[Chimera-users] chimera python shell

Eric Pettersen pett at cgl.ucsf.edu
Wed Oct 31 13:21:37 PDT 2007


On Oct 31, 2007, at 3:44 AM, Ondrej Marsalek wrote:

> hi,
>
> i wanted to ask whether there are any plans to change the idle python
> shell in chimera for something else. i would be interested in
> something with completion and editable history, ideally ipython
> (http://ipython.scipy.org/moin/).
>
> i tried to add ipython to the python embedded in chimera but did  
> not succeed.
>
> i will be grateful for any information or personal experience with  
> this.

We didn't have any plans to change the shell, no.  Looking at  
ipython, it seems quite nice and probably would be slightly better  
than Idle.  Keep in mind that you can essentially get editable  
history in Idle by scrolling the window back to the command(s) you  
want to repeat, inserting the cursor after them, and hitting Return.   
That will insert those commands at the end of the Idle shell where  
you are free to edit them before hitting Return to execute.

I'm going to put "adding ipython" to my to-do list, but it probably  
will take a while to get to since there are a lot of other features  
that need adding that seem to offer more "bang for the buck".  Unless  
other people chime in about how adding it would be important to them...

I know you tried to add ipython yourself, but if you want to try  
again you need to look at what we do with the Idle shell to get it to  
work in Chimera.  Particularly the file <chimera installation>/share/ 
Idle/__init__.py (and ChimeraExtension.py in the same directory).   
There's some stuff in there to prevent quitting Idle from quitting  
Chimera, and to get output to stop going to the Reply Log and go to  
Idle instead (the pushReply() and popReply() calls).  The  
ChimeraExtension.py is for getting Idle to show up in the Tools menu  
as described in one of the Programmer's Examples (http:// 
www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/index.html --  
the "Working with the Chimera Extension Manager" example).

--Eric

                         Eric Pettersen
                         UCSF Computer Graphics Lab
                         pett at cgl.ucsf.edu
                         http://www.cgl.ucsf.edu





More information about the Chimera-users mailing list