View Single Post
  #2   (View Single Post)  
Old 18th October 2008
ocicat ocicat is offline
Join Date: Apr 2008
Posts: 3,290

$ man python2.5

The reason for attaching the Python version number (as I can tell...) is to make the manpages for differing versions available if they are installed. Recognize that there are significant differences in Python in these later versions, so being able to read their respective manpages may be necessary.

If you would rather the version number not be required in scripts (recall that the first line is typically "#!/usr/local/bin/python2.5"...)), since python2.5 lives in /usr/local/bin, it is not uncommon for the following link to be added to hide the version number:

# ln -sf /usr/local/bin/python2.5 /usr/local/bin/python

In other words, creating the above link simplifies the first line in scripts to be "#!/usr/local/bin/python".

If the version of Python installed is 2.5.1 (found with the following command...):

$ python --version

Note that in the manpage's pathname, /usr/local/man/man1/python2.5.1, the last digit is not meant to be associated to Python's version number. It is meant to represent the manpage section number.

Lastly, man(1) output seen in the following:
Originally Posted by IIMarkus
$ man -k python
python (1) - an interpreted, interactive, object-oriented programming language
...means that the full command would be:

$ man 1 python2.5

For the details, study information about "sections" found in the man(1) manpage.

Last edited by ocicat; 18th October 2008 at 04:47 AM.
Reply With Quote