[IPython-user] pfile problems

Fernando Perez fperez.net@gmail....
Wed Jun 4 03:36:02 CDT 2008


Hi Jeremy,

[last of my 'graveyard' emails.  Wohoo! :)  ]

On Sat, Mar 8, 2008 at 5:11 PM, Jeremy M. Jones <zanesdad@bellsouth.net> wrote:
> 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?

Nope, this was just a bug.  Just fixed it in bzr trunk, thanks for the report!

Cheers,

f


More information about the IPython-user mailing list