[IPython-user] difference in ipython and python shell

Asheesh Laroia asheesh@asheesh....
Sun Mar 18 22:39:51 CDT 2007


On Sun, 18 Mar 2007, Fernando Perez wrote:

> On 11/13/06, Seweryn Kokot <skokot@po.opole.pl> wrote:
>>
>> Why ipython and python interactive shell give two different information?

[snip]

> I'm sorry this never got replied to.
>
> I don't see that difference on my system: calling help() in both cases 
> produces exactly the same information on my computer (and it should). It 
> is possible that ipython is running with a different python in your 
> system (it got installed with a specific python version) and you are 
> picking scipy.linalg from two different locations.

You should be able to test that by doing:

>>> import scipy
>>> import scipy.linalg
>>> scipy.linalg
>>> scipy.linalg
<module 'scipy.linalg' from '/usr/lib/python2.5/site-packages/scipy/linalg/__init__.pyc'>
>>> scipy.linalg.eig
<function eig at 0x8379c34>

See if the "module ..." and "function ..." output is the same on both 
setups .  If the module information (esp. the filename!) is different, yo 
uknow you're in a situation like Fernando guessed you were.

(For me, between loads, the function address stays the same, but that's a 
pretty poor indicator and I'm just mentioning in case it happens to be 
helpful.  Rely on the module's declared filename.)

-- Asheesh.

-- 
Q:	What is orange and goes "click, click?"
A:	A ball point carrot.


More information about the IPython-user mailing list