[IPython-user] pfile problems

Jeremy M. Jones zanesdad@bellsouth....
Sat Mar 8 18:11:40 CST 2008


If I have a module named "some_module.py", the beginning of which looks 
like this:

#!/usr/bin/env python

class Foo:
     """my Foo class"""
     def __init__(self):
         pass


  and I do:

In [1]: import some_module

then

In [2]: pfile some_module

opens the file some_module.py and pages it.

And

In [3]: pfile some_module.Foo

opens the file some_module.py and pages it.

But:

In [5]: f = some_module.Foo()

In [6]: pfile f
No file found for f

 From the documentation on pfile, I thought that it was supposed to 
figure out what file an object came from, open it to the location in the 
file that the object was defined, and page the file.  Is this not the 
case, or am I doing something wrong?

- jmj


More information about the IPython-user mailing list