Newbie can't figure out documentation practices
Antonios Christofides
A.Christofides at itia.ntua.gr
Fri May 9 08:58:45 EDT 2003
Hi, I'm slowly switching from Perl to Python, and I'm totally confused
about the user documentation practices used in Python. I found a number
of discussions in the archives, but no clear answer, and very few
downloadable scripts I found include documentation material.
I have a script and want to document it. As an example, here's a
documented hello world in Perl:
#!/usr/bin/perl
=head1 NAME
hello - display a hello world message
=head1 SYNOPSIS
hello
=head1 DESCRIPTION
hello greets the world.
=cut
print "Hello, world!\n";
I don't understand how I am supposed to do this in Python. I know I can
write documentation strings, but is there any command that can read them
and format them into something like a man page or even plain text? I
thought it would be pydoc, but it doesn't seem to work like perldoc. I'm
almost concluding there's no standard way, and people are choosing
whatever they like, e.g. pod, groff, DocBook, or LaTeX. No problem with
that, I just want to make sure my conclusion is correct.
Thanks for answering.
More information about the Python-list
mailing list