[cctbxbb] IPython with cctbx

Oliver Zeldin zeldin at stanford.edu
Mon Sep 8 14:32:37 PDT 2014


Now.. can we make it take arguments from the command line? This way we can
do things like

$libtbx.ipython notebook --matplotib

(or whatever)

For reference, the default ipython launcher does:

import re
import sys

from IPython import start_ipython

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(start_ipython())



On Mon, Sep 8, 2014 at 2:26 PM, Oliver Zeldin <zeldin at stanford.edu> wrote:

> Working now. I have no idea what just happened.
>
> That is odd in the extreme...
>
>
> On Mon, Sep 8, 2014 at 2:15 PM, Nathaniel Echols <nechols at lbl.gov> wrote:
>
>> Try editing libtbx/env_config.py and replace lines 1676-7:
>>
>>       try: import IPython
>>       except ImportError: return
>>
>> with simply "import IPython", then run libtbx.refresh and see what
>> happens.
>>
>> -Nat
>>
>>
>> On Mon, Sep 8, 2014 at 2:09 PM, Oliver Zeldin <zeldin at stanford.edu>
>> wrote:
>>
>>> Nothing (it works).
>>>
>>> Further bits and bobs (my python is installed via Homebrew)
>>>
>>> $python
>>> >>> import IPython
>>> >>> IPython.__file__
>>>
>>> '/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/__init__.pyc'
>>>
>>> Also how I normally launch IPython:
>>> $ cat `which IPython`
>>>
>>> #!/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
>>>
>>> # -*- coding: utf-8 -*-
>>> import re
>>> import sys
>>>
>>> from IPython import start_ipython
>>>
>>> if __name__ == '__main__':
>>>     sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
>>>     sys.exit(start_ipython())
>>>
>>>
>>> On Mon, Sep 8, 2014 at 2:01 PM, Nathaniel Echols <nechols at lbl.gov>
>>> wrote:
>>>
>>>> On Mon, Sep 8, 2014 at 1:58 PM, Oliver Zeldin <zeldin at stanford.edu>
>>>> wrote:
>>>>
>>>>> I have ipython with my usual python build, yet libtbx.ipython does not
>>>>> exist. I've tried libtbx.refresh, and this doesn't give me anything. What
>>>>> should I re-configure with libtbx.configure?
>>>>>
>>>>
>>>> What happens when you run this?
>>>>
>>>> python -c "import IPython"
>>>>
>>>> -Nat
>>>>
>>>> _______________________________________________
>>>> cctbxbb mailing list
>>>> cctbxbb at phenix-online.org
>>>> http://phenix-online.org/mailman/listinfo/cctbxbb
>>>>
>>>>
>>>
>>>
>>> --
>>> Dr. Oliver B. Zeldin
>>> Brunger Group
>>> Stanford University
>>>
>>> _______________________________________________
>>> cctbxbb mailing list
>>> cctbxbb at phenix-online.org
>>> http://phenix-online.org/mailman/listinfo/cctbxbb
>>>
>>>
>>
>> _______________________________________________
>> cctbxbb mailing list
>> cctbxbb at phenix-online.org
>> http://phenix-online.org/mailman/listinfo/cctbxbb
>>
>>
>
>
> --
> Dr. Oliver B. Zeldin
> Brunger Group
> Stanford University
>



-- 
Dr. Oliver B. Zeldin
Brunger Group
Stanford University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://phenix-online.org/pipermail/cctbxbb/attachments/20140908/260167fb/attachment-0001.htm>


More information about the cctbxbb mailing list