[IPython-user] difference in ipython and python shell

Fernando Perez fperez.net@gmail....
Sun Mar 18 21:49:09 CDT 2007


On 11/13/06, Seweryn Kokot <skokot@po.opole.pl> wrote:
>
> Why ipython and python interactive shell give two different information?
>
> --- ipython
> Python 2.4.4 (#2, Oct 20 2006, 00:23:25)
> Type "copyright", "credits" or "license" for more information.
>
> IPython 0.7.2 -- An enhanced Interactive Python.
> ?       -> Introduction to IPython's features.
> %magic  -> Information about IPython's 'magic' % functions.
> help    -> Python's own help system.
> object? -> Details about 'object'. ?object also works, ?? prints more.
>
> In [1]: from scipy import linalg
>
> In [2]: help(linalg.eig)
>
> Help on function eig in module numpy.linalg.linalg:
>
> eig(a)
>     eig(a) returns u,v  where u is the eigenvalues and
>     v is a matrix of eigenvectors with vector v[:,i] corresponds to
>     eigenvalue u[i].  Satisfies the equation dot(a, v[:,i]) =
>     u[i]*v[:,i]
> --- ipython
>
> while
>
> --- python
> Python 2.4.4 (#2, Oct 20 2006, 00:23:25)
> [GCC 4.1.2 20061015 (prerelease) (Debian 4.1.1-16.1)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from scipy import linalg
> >>> help(linalg.eig)
>
> Help on function eig in module scipy.linalg.decomp:
>
> eig(a, b=None, left=False, right=True, overwrite_a=False, overwrite_b=False)
>     Solve ordinary and generalized eigenvalue problem
>     of a square matrix.
>

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.

It's the only explanation I can think of.

Cheers,

f


More information about the IPython-user mailing list