
Stupid Mail.app signature-adding feature! On Aug 13, 2008, at 2:17 PM, Eric Pettersen wrote:
Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu
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) importing chimeraInit, and (5) calling chimeraInit.init with either nogui=True or eventloop=False.
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/ lib/python2.5/site-packages
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/ chimera.dev/lib PYTHONPATH=/usr/local/chimera.dev/share:/usr/local/ chimera.dev/lib:/usr/local/chimera.dev/lib/python2.5/site-packages python2.5
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.
--Eric
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev