Linux.com

Re:Jem "doesn't see the usefulness"?

Posted by: Anonymous Coward on October 24, 2005 11:29 AM
I changed this a bit, now it can handle pages like<nobr> <wbr></nobr>/usr/share/man/man1/otags-2.1.69.1.gz.
<tt>#!/usr/bin/python
import glob, os, random
fullpath = random.choice(glob.glob('/usr/share/man/man*/*'))

  page = os.path.split(fullpath)[1]
title = '.'.join(page.split('.')[:-2])
section = page.split('.')[-2]
os.system('man %s %s' % (section, title))</tt>
The line starting with "page =" shouldn't be indented. I don't know what's up with that.

#

Return to Review: <em>Linux in a Nutshell</em>