These are chat archives for ipython/ipython

10th
Sep 2015
Ge Yang
@episodeyang
Sep 10 2015 01:13
:)
gitgit137
@gitgit137
Sep 10 2015 03:03
Hello all, I am a c++ developer. Been using Python on and off, just for scripting. Just realised should have been looking at ipython and notebook all along. I am following Perez' introductory talk and trying things out.
%pfile?

Print (or run through pager) the file where an object is defined.

The file opens at the line where the object definition begins.

If the given argument is not an object currently defined, ...............
Could you please explain what this %pfile is?
Lets say have an integer x.
x is an object. Hence Can I do %pfile x?
I understand that "%pfile myfilename" displays the file in the pager(which is popup window below )
Could you please clarify the line - "Print (or run through pager) the file where an object is defined."?
Matthias Bussonnier
@Carreau
Sep 10 2015 03:07
hi @gitgit137
I think that by object, the docs means the class definition of the object instance.
If this is availlable.
so, of something return a instance of say class Foo(object):, pfile will open the filename where Foo is defined.
integers class is defined in C, and are built-in, so it will be one case where Python cannot extract the original file in which the int type is defined.
Matthias Bussonnier
@Carreau
Sep 10 2015 03:13
Here is a (trivial) example
In [13]: !cat bar.py
class Bar:pass

In [14]: import bar

In [15]: b = bar.Bar()

In [16]: %pfile b
class Bar:pass
gitgit137
@gitgit137
Sep 10 2015 03:25
Wow. Should have tried this. Thanks Carreau
Sylvain Corlay
@SylvainCorlay
Sep 10 2015 17:55
@ellisonbg @rmorshea are you guys around?
Ryan Morshead
@rmorshea
Sep 10 2015 17:57
@ellisonbg isn't here right now, but yesterday he was interested in meeting.
Sylvain Corlay
@SylvainCorlay
Sep 10 2015 17:58
ok, let me know if you are available to discuss on completing the traitlets stuff.
Ryan Morshead
@rmorshea
Sep 10 2015 18:00
I'm free now and for the rest of today, though we should probably wait for brian.
Sylvain Corlay
@SylvainCorlay
Sep 10 2015 18:00
yes, I meant you and Brian
Ryan Morshead
@rmorshea
Sep 10 2015 18:00
great, I'll let you know.
Scott Sanderson
@ssanderson
Sep 10 2015 18:19
anyone know if there's a numpy-style docstring convention for the expected inputs to send() calls into a coroutine?
Ryan Morshead
@rmorshea
Sep 10 2015 19:33
@SylvainCorlay brian says he'll be available at 2:30
Sylvain Corlay
@SylvainCorlay
Sep 10 2015 19:33
tz?
Ryan Morshead
@rmorshea
Sep 10 2015 19:33
pacific
Min RK
@minrk
Sep 10 2015 19:51
All times are UTC!
Sylvain Corlay
@SylvainCorlay
Sep 10 2015 20:02
ok, it is fine with me
Ryan Morshead
@rmorshea
Sep 10 2015 21:28
@SylvainCorlay how do you want to meet?
Sylvain Corlay
@SylvainCorlay
Sep 10 2015 21:28
I can create the conference call
I sent the invite to brian
Sylvain Corlay
@SylvainCorlay
Sep 10 2015 21:35
I am on the call