Sunday, July 5, 2009

New command line interface to PyMOTW

The 1.95 release of PyMOTW includes a command line interface to access the documentation for a module.

The package can be installed via easy_install or pip:

$ pip install PyMOTW
Downloading/unpacking PyMOTW
Downloading PyMOTW-1.95.tar.gz (2.2Mb): 2.2Mb downloaded
Running setup.py egg_info for package PyMOTW
warning: no files found matching 'ChangeLog'
warning: no files found matching '*.py' under directory 'sphinx/templates'
no previously-included directories found matching 'utils'
Installing collected packages: PyMOTW
Running setup.py install for PyMOTW
changing mode of build/scripts-2.6/motw from 644 to 755
warning: no files found matching 'ChangeLog'
warning: no files found matching '*.py' under directory 'sphinx/templates'
no previously-included directories found matching 'utils'
changing mode of /Users/dhellmann/.virtualenvs/testpymotw/bin/motw to 755
Successfully installed PyMOTW


and then to use the command line interface, run motw.

$ motw -h
Usage: motw [options]

Options:
-h, --help show this help message and exit
-t, --text Print plain-text version of help to stdout
-w, --web Open HTML version of help from web
--html Open HTML version of help from installed file


For example, motw abc opens the local version of this week's article. You can also use the "-w" option to go to my web site instead of reading the local version, so you always have the latest version of an article.

2 comments:

tcourbon said...

Hi !
I really appreciate your PyMoTW !
I didn't find any info on a French translation for those.I think that it would be great if your article could be released in French I propose myself to do the translation.
May I ?

Doug Hellmann said...

A French translation would make a nice addition to the project. Feel free to grab the sources from BitBucket and get started when you have time. Send me a link via email when you have a couple of articles done, and I'll add a link to your site and announce it through this blog.

You might also want to join http://groups.google.com/group/pymotw to share tips with other translators, but that's not required.

Thanks!