Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > iPython help, Docstring [source file open failed]

Reply
Thread Tools

iPython help, Docstring [source file open failed]

 
 
Kegan
Guest
Posts: n/a
 
      04-14-2009
I use iPython installed from macport. When I am in the iPython shell,
I do the following:


In [8]: from datetime import timedelta

In [9]: timedelta??
Type: type
Base Class: <type 'type'>
String Form: <type 'datetime.timedelta'>
Namespace: Interactive
File: /opt/local/Library/Frameworks/Python.framework/
Versions/2.5/lib/python2.5/lib-dynload/datetime.so
Docstring [source file open failed]:
Difference between two datetime values.


Lets say I want more information about timedelta right at the shell
(as oppose lookup at Python Doc). Can I somehow link the actual Python
source code to iPython so that it can be accessed in that way?

I am using macport. Please help.
 
Reply With Quote
 
 
 
 
R. David Murray
Guest
Posts: n/a
 
      04-15-2009
Kegan <(E-Mail Removed)> wrote:
> I use iPython installed from macport. When I am in the iPython shell,
> I do the following:
>
>
> In [8]: from datetime import timedelta
>
> In [9]: timedelta??
> Type: type
> Base Class: <type 'type'>
> String Form: <type 'datetime.timedelta'>
> Namespace: Interactive
> File: /opt/local/Library/Frameworks/Python.framework/
> Versions/2.5/lib/python2.5/lib-dynload/datetime.so
> Docstring [source file open failed]:
> Difference between two datetime values.
>
>
> Lets say I want more information about timedelta right at the shell
> (as oppose lookup at Python Doc). Can I somehow link the actual Python
> source code to iPython so that it can be accessed in that way?


Notice that the filetype is '.so'. That means it is a compiled
C module, so there is no python source to view.

--
R. David Murray http://www.bitdance.com

 
Reply With Quote
 
 
 
 
alex23
Guest
Posts: n/a
 
      04-15-2009
On Apr 15, 5:35*am, Przemyslaw Kaminski <(E-Mail Removed)> wrote:
> You may want to try:
> import pydoc
> b = pydoc.render_doc(timedelta)
> print b


Isn't this exactly the same output you get from typing 'help
(timedelta)' though?
 
Reply With Quote
 
P. Kaminski
Guest
Posts: n/a
 
      04-15-2009
On 15 Kwi, 03:27, alex23 <(E-Mail Removed)> wrote:
> On Apr 15, 5:35*am, Przemyslaw Kaminski <(E-Mail Removed)> wrote:
>
> > You may want to try:
> > import pydoc
> > b = pydoc.render_doc(timedelta)
> > print b

>
> Isn't this exactly the same output you get from typing 'help
> (timedelta)' though?


Well, from this:

Lets say I want more information about timedelta right at the shell
(as oppose lookup at Python Doc).

I understood that Kegan wanted python documentation, as in help, but
without the pager, right at the shell. Correct me if I'm wrong.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ipython -wthread vs. ipython -pylab Wolfram Brenig Python 0 09-12-2011 03:39 PM
ipython / vs \ in readline on MS Windows (and ipython help grepper) bdb112 Python 2 03-12-2009 05:34 PM
docstring reference to another docstring bdb112 Python 3 03-09-2009 11:23 PM
Tip: 'Open IPython here' in Windows context menu Karlo Lozovina Python 1 02-27-2007 07:57 AM
emacs python-mode questions: C-c C-c and broken docstring fill John J. Lee Python 6 07-29-2003 08:00 PM



Advertisments