Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

py2exe and pydocs. Downloads?

3 views
Skip to first unread message

W. eWatson

unread,
Jan 17, 2010, 1:16:17 PM1/17/10
to
I'm using Python 2.5 under windows, and IDLE. Do py2exe and pydocs come
with the package, or do I have to download them?

Gabriel Genellina

unread,
Jan 17, 2010, 4:22:28 PM1/17/10
to pytho...@python.org
En Sun, 17 Jan 2010 15:16:17 -0300, W. eWatson <wolft...@invalid.com>
escribiᅵ:

> I'm using Python 2.5 under windows, and IDLE. Do py2exe and pydocs come
> with the package, or do I have to download them?

py2exe has to be downloaded from www.py2exe.org
I don't know pydocs, but pydoc comes with Python

--
Gabriel Genellina

W. eWatson

unread,
Jan 17, 2010, 5:43:25 PM1/17/10
to
Thanks. I'll look at the link. Actually, I was close
<http://www.py2exe.org/index.cgi/Tutorial>, but no banana (cigar). Yep,
right on your link, download from source forge.

According to Lutz's 4th edition (reading from Amazon), Pydoc is shipped
with Python. I found this earlier in the Python Help under Global Index
for modules.
==========================
The pydoc module automatically generates documentation from Python
modules. The documentation can be presented as pages of text on the
console, served to a Web browser, or saved to HTML files.

The built-in function help() invokes the online help system in the
interactive interpreter, which uses pydoc to generate its documentation
as text on the console. The same text documentation can also be viewed
from outside the Python interpreter by running pydoc as a script at the
operating system's command prompt. For example, running


pydoc sys

at a shell prompt
=========================
I get:
>>> import pydoc
>>> pydoc sys
SyntaxError: invalid syntax
>>>
The book says Help uses it, and there's some sort of html version, but
I'm missing something here. Command line, Linux shell?

Gabriel Genellina

unread,
Jan 17, 2010, 10:40:22 PM1/17/10
to pytho...@python.org
En Sun, 17 Jan 2010 19:43:25 -0300, W. eWatson <wolft...@invalid.com>
escribiᅵ:

> According to Lutz's 4th edition (reading from Amazon), Pydoc is shipped

> with Python. I found this earlier in the Python Help under Global Index
> for modules.
> ==========================
> The pydoc module automatically generates documentation from Python
> modules. The documentation can be presented as pages of text on the
> console, served to a Web browser, or saved to HTML files.
>
> The built-in function help() invokes the online help system in the
> interactive interpreter, which uses pydoc to generate its documentation
> as text on the console. The same text documentation can also be viewed
> from outside the Python interpreter by running pydoc as a script at the
> operating system's command prompt. For example, running
>
>
> pydoc sys
>
> at a shell prompt
> =========================
> I get:
> >>> import pydoc
> >>> pydoc sys
> SyntaxError: invalid syntax
> >>>
> The book says Help uses it, and there's some sort of html version, but
> I'm missing something here. Command line, Linux shell?

From *inside* the Python interpreter:

py> import sys
py> help(sys)
Help on built-in module sys:

NAME
sys

FILE
(built-in)
[...lots of info...]

py> help("sys")
Help on built-in module sys:
[...same info...]


From the system command line (shell, command prompt, DOS box...), assuming
you're using 2.5 or later:

c:\temp>python -m pydoc sys
Help on built-in module sys:
[...same info...]


C:\TEMP>python -m pydoc
pydoc - the Python documentation tool

pydoc.py <name> ...
Show text documentation on something. <name> may be the name of a
Python keyword, topic, function, module, or package, or a dotted
reference to a class or function within a module or module in a
package. If <name> contains a '\', it is used as the path to a
Python source file to document. If name is 'keywords', 'topics',
or 'modules', a listing of these things is displayed.

pydoc.py -k <keyword>
Search for a keyword in the synopsis lines of all available modules.

pydoc.py -p <port>
Start an HTTP server on the given port on the local machine.

pydoc.py -g
Pop up a graphical interface for finding and serving documentation.

pydoc.py -w <name> ...
Write out the HTML documentation for a module to a file in the current
directory. If <name> contains a '\', it is treated as a filename; if
it names a directory, documentation is written for all the contents.


Try the -g option; it lets you search for the relevant documentation and
show it on your favorite web browser (locally).

Depending on how you installed Python, you may find a 'pydoc' or
'pydocgui' script somewhere in your Python directory.

--
Gabriel Genellina

Gib Bogle

unread,
Jan 20, 2010, 7:22:19 PM1/20/10
to
Gabriel Genellina wrote:

> c:\temp>python -m pydoc sys
> Help on built-in module sys:
> [...same info...]

When I do this I get:

No module named tempfile

Gabriel Genellina

unread,
Jan 21, 2010, 1:40:49 AM1/21/10
to pytho...@python.org
En Wed, 20 Jan 2010 21:22:19 -0300, Gib Bogle
<g.b...@auckland.no.spam.ac.nz> escribi�:

You found a bug. Looks like it depends on the environment, or what
packages are installed, or something like that, because it worked on my
other PC but not here.
Please report it at http://bugs.python.org so it doesn't get forgotten.

--
Gabriel Genellina

Gib Bogle

unread,
Jan 21, 2010, 4:24:03 PM1/21/10
to
Gabriel Genellina wrote:

> You found a bug. Looks like it depends on the environment, or what
> packages are installed, or something like that, because it worked on my
> other PC but not here.
> Please report it at http://bugs.python.org so it doesn't get forgotten.
>

Done

Jorgen Grahn

unread,
Jan 21, 2010, 4:33:18 PM1/21/10
to

And for reference, it's <http://bugs.python.org/issue7749>, "pydoc error".

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .

Gib Bogle

unread,
Jan 21, 2010, 5:10:46 PM1/21/10
to

The bug checkers are not able to reproduce the error. What is your other PC
running?

0 new messages