Parsing the command line

Category: Python - Education

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 script allows to use optparse with a minimum of boilerplate, trading flexibility for easy of use. Date: 12 January, 2012


Parsing Command Line - Optparse Module Use - Optparse Example - Parsing - Command - Line

Homepage: http://code.activestate.com/

Developer: code.activestate.com

License: Freeware

Operating System: All

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

Texpand class provides a way to expand textareas to fit it's contents.

developer Developer: Arturs Sosins
license License: BSD License
operating systems Operating System: Not Available


Tmatrix class generates transformation matrix from provided transformations.

developer Developer: Arturs Sosins
license License: BSD License
operating systems Operating System: Not Available


This script easily extract data from microsoft excel files using this wrapper class for xlrd.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


Battle.

developer Developer: planet-source-code.com
license License: Freeware
operating systems Operating System: All


BibTeX is a text-based file format for listing bibliographical references.

developer Developer: SourceForge.net
license License: Freeware
operating systems Operating System: All


The List monad in Haskell has many uses, including parsing and nondeterministic algorithms.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


Instead of using $KCODE = 'UTF8' together with require 'jcode' you can use the /u regex parameter to parse UTF-8 strings containing multibyte characters.

developer Developer: snippets.dzone.com
license License: Freeware
operating systems Operating System: Linux


This script implements a base class, which allows derived classes to track instances in self.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


This script contains many recipes to memoize functions.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All