Python to Perl Conversions

Tom Christiansen tchrist at
Thu Aug 19 21:10:06 CEST 1999

     [courtesy cc of this posting mailed to cited author]

In comp.lang.python, 
    Donn Cave <donn at> writes:
:Searchable CLI documentation is a good thing, and I take that as the main
:point of your post here, but the way Perl and Tcl dump man pages into man3
:isn't something Python needs to emulate on my account.  

I agree entirely, and Perl shouldn't be doing that.  It uses 
it's only manpath, which is separate.  For example:

    % perl -V:man.dir

That tells me that I can just use as an alias pman to be
"man -P /usr/local/perl/man" or "MANPATH=/usr/local/perl/man man"

Your site may have them installed in different locations, but
the principle is the same.  

But this doesn't help the module documentation issue.  When a 
new module is installed, I get to see it with apropos (that's 
"man -k" for some of you):

% pman -k net
perlfaq9 (1)         - Networking ($Revision: 1.24 $, f(CW$Date: 1999/01/08 05:39:48 $)
lwp-download (1)     - fetch large files from the net
CGI::Cookie (3pm)    - Interface to Netscape Cookies
IO::Socket::INET (3pm) - Object interface for AF_INET domain sockets
Mail::Internet (3pm) - manipulate Internet format (RFC 822) mail messages
Net::Cmd (3pm)       - Network Command class (as used by FTP, SMTP etc)
Net::Domain (3pm)    - Attempt to evaluate the current host's internet name and domain
Net::DummyInetd (3pm) - A dummy Inetd server
Net::FTP (3pm)       - FTP Client class
Net::NNTP (3pm)      - NNTP Client class
Net::Netrc (3pm)     - OO interface to users netrc file
Net::PH (3pm)        - CCSO Nameserver Client class
Net::POP3 (3pm)      - Post Office Protocol 3 Client class (RFC1081)
Net::Ping (3pm)      - check a remote host for reachability
Net::SMTP (3pm)      - Simple Mail Transfer Protocol Client
Net::SNPP (3pm)      - Simple Network Pager Protocol Client
Net::Telnet (3pm)    - interact with TELNET port or other TCP ports
Net::Time (3pm)      - time and daytime network client interface
Net::hostent (3pm)   - by-name interface to Perl's built-in gethost*() functions
Net::netent (3pm)    - by-name interface to Perl's built-in getnet*() functions
Net::protoent (3pm)  - by-name interface to Perl's built-in getproto*() functions
Net::servent (3pm)   - by-name interface to Perl's built-in getserv*() functions
Socket, sockaddr_in, sockaddr_un, inet_aton, inet_ntoa (3pm) - load the C socket.h defines and structure manipulators

Nifty, eh?  I wonder how to do that when you install modules in Python?
How close an automated, MakeMaker-like thing do you have?

:Man pages could be disposed in the same name-space-sensitive way we
:design libraries, modules, etc., and if anyone feels like working the
:Python documentation into man pages I hope that will be considered.

I'm still dumb-founded that so many Python people don't use the manpages,
or evens expects them!  Considering how much I've complained, I'd
certainly be willing to give it a try.  Do they come in a basic format
that can just be passed through a filter?  And no, we don't really use
manpages for Perl.  We use pod, then translate to many formats. 
The Prisoners of Bill gets HTML, regular Unix users get manpages,
and anyone can have simple text.  And everyone is happy.

 If you choose not to decide, you still have made a choice.  --Rush

More information about the Python-list mailing list