[IPython-user] how to tell module to which a given function belongs?

Gael Varoquaux gael.varoquaux@normalesup....
Tue Jul 14 13:08:20 CDT 2009


On Tue, Jul 14, 2009 at 11:03:24AM -0700, Dr. Phillip M. Feldman wrote:

> Does IPython have a function like "which" that identifies the module to which
> a given function belongs?  If not, it would be great to have something like
> this.

If your function is called foo, you can do

In[1] : foo?

(press return) and the file in which the function is defined appears in
the answer.

Gaël


More information about the IPython-user mailing list