1.1.3.1. gnr.devel.commands

Last page update: November 23, 2011

Classes:

External methods:

Complete reference:

1.1.3.1.1. CmdRunner

1.1.3.1.3. External methods

These methods don’t belong to any class.

1.1.3.1.4. gnr.devel.commands - The complete reference list

A framework to build command line utilities in GenroPy.

Argument parsing inspired by Michele Simionato’s plac.

Three scripts for the genro-kings under softwell sky,
Seven for goodsoftware-lords in their halls of stone,
Nine for mortal customers with money they will buy,
One for the Dark Lord Gio on his dark throne,
In the Land of GenroPy where the Commands lie.
One Script to rule them all, One Script to find them,
One Script to bring them all and in the darkness bind them
In the Land of GenroPy where the Commands lie
class gnr.devel.commands.CmdRunner

Run GenroPy commands.

This class implements the ‘gnr’ command

main()

Parse command line and execute ‘gnr’ commands.

setup_parser()

TODO

class gnr.devel.commands.GnrCommand(main=None, name=None, help=None, *args, **kwargs)

A command line utility.

auto_arguments()

Auto-generate a standard argument configuration from __call__’s python arguments

description

Return the command description

filename

File where main is implemented

init_parser(subparsers=None)

Initialize this command’s arguments.

Parameters:subparsers – TODO
lineno

Line where main is implemented

main()

TODO

run(*args, **kwargs)

Run this command

gnr.devel.commands.argument(dest, *args, **kwargs)

A decorator to describe arguments to a ‘gnr’ command. Return the command

See add_argument in the argparse module for help on args

Parameters:dest – TODO
gnr.devel.commands.command(name=None, description=None, *args, **kwargs)

A decorator to define new ‘gnr’ commands. Return the new command. See ArgumentParser constructor in the argparse module for help on args

Parameters:
  • name – TODO
  • description – TODO