Questions tagged [pydoc]

Pydoc is a documentation module for the programming language Python.

Similar to the functionality of Perldoc within Perl, Pydoc allows Python programmers to access Python's documentation help files, generate HTML pages with documentation specifics, and find the appropriate module for a particular job.

169 questions
89
votes
4 answers

How do I create documentation with Pydoc?

I'm trying to create a document out of my module. I used pydoc from the command-line in Windows 7 using Python 3.2.3: python "\pydoc.py" -w myModule This led to my shell being filled with text, one line for each file in my module,…
user1632861
35
votes
5 answers

Relative imports require the 'package' argument

I want to use Sphinx so it can automatically generate a pydoc for my python code but I'm getting an error. What an I doing wrong? conf.py sphinx config file import sys import os from django.conf import settings os.environ['DJANGO_SETTINGS_MODULE'] =…
ogward
  • 1,183
  • 4
  • 13
  • 18
28
votes
2 answers

How to comment parameters for pydoc

Is there a way to comment the parameters of a function to make them recognized by the pydoc library ? i.e what is the docstring for pydoc?
PatriceG
  • 3,851
  • 5
  • 28
  • 43
27
votes
2 answers

Display pydoc's description as part of argparse '--help'

I am using argparse.ArgumentParser() in my script, I would like to display the pydoc description of my script as part of the '--help' option of the argparse. One possibly solution can be to use the formatter_class or the description attribute of…
baky
  • 631
  • 1
  • 8
  • 17
27
votes
12 answers

How do I export the output of Python's built-in help() function

I've got a python package which outputs considerable help text from: help(package) I would like to export this help text to a file, in the format in which it's displayed by help(package) How might I go about this?
ipmcc
  • 29,581
  • 5
  • 84
  • 147
23
votes
10 answers

What does the Pydoc module do?

New to programming and python altogether. In the book I'm learning from, the author suggested I find out the purpose of Pydoc. I did a google search on it, and found a match (from Gnome Terminal) but it didn't make much sense to me. Anyone mind…
logan beaupre
  • 347
  • 1
  • 2
  • 3
20
votes
4 answers

Is there an option to print the output of help()?

Is there an option to print the output of help('myfun'). The behaviour I'm seeing is that output is printed to std.out and the script waits for user input (i.e. type 'q' to continue). There must be a setting to set this to just dump…
mathtick
  • 6,487
  • 13
  • 56
  • 101
19
votes
7 answers

How to get pydoc command working in Windows?

pydoc does not work in Windows. at this post Pydoc is not working (Windows XP) the last answer by dave webb says to create a pydoc.bat file with this code in it: @python c:\Python27\Lib\pydoc.py %* After I create pydoc.bat where should it be placed…
pylonicon
18
votes
4 answers

How to denote return type tuple in Google-style Pydoc for Pycharm?

In Pycharm I want to have a documented function that returns a tuple so that I can get code completion on it. The style of comments is Google-style. This works correctly: def func(): """ Returns: str: something """ …
Martin Melka
  • 7,177
  • 16
  • 79
  • 138
16
votes
0 answers

Sphinx vs. Pydoc

I'm deciding whether to use Sphinx or Pydoc for documenting a large existent project. Which one should I choose? Which one perform better on given conditions? Which one is faster to configure a run over a project?
danielmaxx
  • 353
  • 4
  • 12
13
votes
1 answer

Document python using Eclipse/Pydev

I am new to python development and use Eclipse/Pydev. Is there a nice way to integrate tools for generating documentations (e.g. Sphinx, pydoc) into the IDE to have a nice workflow, maybe showing the documentation in a separate tab?
netrus
  • 153
  • 1
  • 9
12
votes
11 answers

How to get pydoc command working in Windows 7 cmd?

I'm learning to program Python from the "Learning Python the Hard Way". On one of the chapters it tells me to use pydoc command. The windows 7 cmd failed miserably with that command. When I typed in pydoc raw_input() on cmd following error codes…
Jordan
  • 145
  • 1
  • 2
  • 5
12
votes
1 answer

Pydoc not seeing docstrings?

Obviously I am missing something serious here. Here is my test program: """ Doc and nothing but doc """ class TestMe(object): """ class documentation goes here """ def testFunc(self): """ FunctionDoc Goes here …
Skip Huffman
  • 5,239
  • 11
  • 41
  • 51
10
votes
2 answers

Where does Python's pydoc help function get its content?

I have a lot of callable objects and they all have the __doc__ string correctly filled out, but running help on them produces the help for their class instead of help based on __doc__. I want to change it so that running help on them produces…
Gordon Wrigley
  • 11,015
  • 10
  • 48
  • 62
8
votes
8 answers

Pydoc is not working (Windows XP)

Using Windows XP and Python 2.7 I tried to run "pydoc" through the terminal. unfortunately it doesn't work. Since I'm not allowed to post a screenshot (Newbie). Here is what it says (white on black) What I type: "C:\Python27>pydoc raw_input /"pydoc…
Twiek
  • 2,013
  • 2
  • 14
  • 14
1
2 3
11 12