Parsing the command line Icon

Parsing the command line

Parsing the command line script allows to use optparse module

Parsing the command lineOverview

The module optparse was a great addition to Python 2.3, since it is much more powerful and easier to use than getopt. Using optparse, writing command-line tools is a breeze. However, The Power of optparse comes together with a certain verbosity. This recipe allows to use optparse with a minimum of boilerplate, trading flexibility for easy of use. Still, it covers 95% of my common needs, so I think it may be useful to others.

NEW

Fixed some bugs.

Parsing the command lineInformation

Version
1.1
Date
03.31.10
License
Free
Language
English
File Size
N/A
Category
SubCategory
Operating Systems
Windows ,Linux,Mac OS,BSD,Solaris
System Requirements
No additional system requirements.
How to freeze Python classes Icon
How to freeze Python classes script raises an error
More
Principal Component Analysis (PCA) Icon
A class that carries out Principal Component Analysis (PCA).
Free
Deal Or No Deal Game Icon
A game based on the tv game show, Deal Or No Deal.
Free
Disk Dumper Icon
This recipe will display a hex dump of the disk specified on the command line.
Complex Boolean Regular Expression Class Icon
Need to look for the occurence of words in a string or group of words
Free
Display an Image from a specified file Icon
Reads an image file from the filename specified as the 1st parameter
Free
Quickslice decorator Icon
Quickslice decorator script defines a decorator that allows for an abbreviated
Free
mx.ODBC example Icon
mx.ODBC example script shows you how to get the columns of a table and get data.
Free
Python replacement for java.util.Properties Icon
Quick and easy way to process Java properties files using pure Python
Free
More