Package babel :: Package messages :: Module frontend :: Class CommandLineInterface |

# Class CommandLineInterface

    object --+
             |
            CommandLineInterface

Command-line interface.

This class provides a simple command-line interface to the message extraction and PO file generation functionality.

Instance Methods
run(self, argv=`[``'``(imported)``'``]`) Main entry point of the command-line interface. |
compile(self, argv) Subcommand for compiling a message catalog to a MO file. |
extract(self, argv) Subcommand for extracting messages from source files and generating a POT file. |
init(self, argv) Subcommand for creating new message catalogs from a template. |
update(self, argv) Subcommand for updating existing message catalogs from a template. |
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__init__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables
| usage = ``'``%%prog %s [options] %s``'``
| version = ``'``%prog 0.9.5``'``
| commands = ``{``'``compile``'``:` `'``compile message catalogs to MO files``'``,``...``

Properties
Inherited from `object`: `__class__`

Method Details

### run(self, argv=`[``'``(imported)``'``]`) |
Main entry point of the command-line interface. Parameters: `argv` - list of arguments passed on the command-line

### compile(self, argv) |
Subcommand for compiling a message catalog to a MO file. Parameters: `argv` - the command arguments Since: version 0.9

### extract(self, argv) |
Subcommand for extracting messages from source files and generating a POT file. Parameters: `argv` - the command arguments

### init(self, argv) |
Subcommand for creating new message catalogs from a template. Parameters: `argv` - the command arguments

### update(self, argv) |
Subcommand for updating existing message catalogs from a template. Parameters: `argv` - the command arguments Since: version 0.9

Class Variable Details

  ### commands Value:
      {'compile': 'compile message catalogs to MO files',
       'extract': 'extract messages from source files and generate a POT fil
      e',
       'init': 'create new message catalogs from a POT file',
       'update': 'update existing message catalogs from a POT file'}