Finaloption

Command-line parsing done right
Download

Finaloption Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Alexander Solovyov
  • Publisher web site:
  • http://hg.piranha.org.ua/

Finaloption Tags


Finaloption Description

Command-line parsing done right Finaloption is a command-line parser, intended to make writing command-line applications painless and easy. It uses built-in Python types (lists, dictionaries, etc) to define options, which makes configuration clear and concise. Additionally it contains possibility to handle subcommands (i.e. hg commit or svn update).JFYI: name is derived from Die Krupps' song Final Option.Quick example:That's simple example to show you example of an option definition:import sysfrom finaloption import command@command(usage='%name MESSAGE')def main(message, nonewline=('n', False, 'don't print a newline')): 'Simple echo program' sys.stdout.write(message) if not nonewline: sys.stdout.write(' ')if __name__ == '__main__': main()Running this program will print the help:echo.py MESSAGESimple echo programoptions: -n --nonewline don't print a newline -h --help show help Requirements: · Python What's New in This Release: · Fixed bug, which prevented programs to work without arguments (displayed help instead) if they are not using subcommands.


Finaloption Related Software