[chimera-dev] chimera import from unmodified python 2.5
pett at cgl.ucsf.edu
Wed Aug 13 14:17:10 PDT 2008
UCSF Computer Graphics Lab
On Aug 9, 2008, at 1:51 PM, Ondrej Marsalek wrote:
>> And yes, please share how you are using chimera with the stock
>> python. It
>> should be as "simple" as (1) setting the CHIMERA environment
>> variable, (2)
>> adding CHIMERA/lib to LD_LIBRARY_PATH, (3) optionally setting up
>> Tcl and Tk
>> to be chimera's version, (4) adding CHIMERA/share to sys.path, (3)
>> chimeraInit, and (5) calling chimeraInit.init with either
>> nogui=True or
> i have the following chimera.env file that i source in bash:
> export CHIMERA=/opt/chimera
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CHIMERA/lib
> export PYTHONPATH=$PYTHONPATH:$CHIMERA/share:$CHIMERA/lib:$CHIMERA/
> the nogui version works, but that is not exactly what i wanted, as
> that provides a midas prompt (if i understand it correctly). i would
> rather like to stay in my original python shell (ipython in this
> case). is there a way to do that?
Here's what works for me:
env CHIMERA=/usr/local/chimera.dev LD_LIBRARY_PATH=/usr/local/
You will have to adjust the above to your local installation, and may
want to include the original values of LD_LIBRARY_PATH and PYTHONPATH
if they are normally non-empty for you (i.e. in a similar fashion to
your original export statements).
At the resulting python prompt:
from chimeraInit import init
init(, nogui=True, script="py:/dev/null")
The "script=" keyword arg prevents Chimera from giving you it's own
command prompt since you are tricking it into believing that you've
provided a script to execute (/dev/null is always an empty file).
Alternatively, you could have just typed "stop" at the prompt that
Chimera gave you and gotten back to the python prompt.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chimera-dev