admin Package

api Module

exception tic.development.admin.api.AdminCommandError(msg, show_usage=False, cmd=None)[source]

Bases: tic.core.TicError

Exception raised when an admin command cannot be executed.

class tic.development.admin.api.AdminCommandManager(compmgr, init=None, cls=<class 'tic.development.admin.api.AdminCommandManager'>)[source]

Bases: tic.core.Component

tic command manager.

complete_command(args, cmd_only=False)[source]

Perform auto-completion on the given arguments.

execute_command(*args)[source]

Execute a command given by a list of arguments.

get_command_help(args=[])[source]

Return help information for a set of commands.

providers

List of components that implement tic.development.admin.api.IAdminCommandProvider

class tic.development.admin.api.IAdminCommandProvider[source]

Bases: tic.core.Interface

Extension point interface for adding commands to the console administration interface.

get_admin_commands()[source]

Return a list of available admin commands.

The items returned by this function must be tuples of the form (command, args, help, complete, execute), where command contains the space-separated command and sub-command names, args is a string describing the command arguments and help is the help text. The first paragraph of the help text is taken as a short help, shown in the list of commands.

complete is called to auto-complete the command arguments, with the current list of arguments as its only argument. It should return a list of relevant values for the last argument in the list.

execute is called to execute the command, with the command arguments passed as positional arguments.

class tic.development.admin.api.PathList[source]

Bases: list

A list of paths for command argument auto-completion.

complete(text)[source]

Return the items in the list matching text.

class tic.development.admin.api.PrefixList[source]

Bases: list

A list of prefixes for command argument auto-completion.

complete(text)[source]
tic.development.admin.api.get_dir_list(path, dirs_only=False)[source]

Return a list of paths to filesystem entries in the same directory as the given path.

console Module

class tic.development.admin.console.TicAdmin[source]

Bases: cmd.Cmd

classmethod all_docs(env=None)[source]
arg_tokenize(argstr)[source]

argstr is an unicode string

... but shlex is not unicode friendly.

complete_help(text, line, begidx, endidx)[source]
complete_line(text, line, cmd_only=False)[source]
completedefault(text, line, begidx, endidx)[source]
completenames(text, line, begidx, endidx)[source]
default(line)[source]
do_EOF(line)
do_exit(line)
do_help(line=None)[source]
do_quit(line)[source]
doc_header = 'Tic Admin Console 0.1\nAvailable Commands:\n'
emptyline()[source]
env[source]
env_check()[source]
env_set()[source]
envname = None
init_appengine_path()[source]

TODOC

intro = ''
onecmd(line)[source]

line may be a str or an unicode object

classmethod print_doc(docs, stream=None, short=False, long=False)[source]
prompt = 'tic> '
ruler = ''
run()[source]
static split_help_text(text)[source]
word_complete(text, words)[source]
tic.development.admin.console.find_readline_lib()[source]

Return the name (and possibly the full path) of the readline library linked to the readline module.

tic.development.admin.console.run(args=None)[source]

Main entry point.

util Module

tic.development.admin.util.console_print(out, *args, **kwargs)[source]
tic.development.admin.util.exception_to_unicode(e, traceback=False)[source]
tic.development.admin.util.get_last_traceback()[source]
tic.development.admin.util.printerr(*args, **kwargs)[source]
tic.development.admin.util.printout(*args, **kwargs)[source]
tic.development.admin.util.to_unicode(text, charset=None)[source]

Convert input to an unicode object.

For a str object, we’ll first try to decode the bytes using the given charset encoding (or UTF-8 if none is specified), then we fall back to the latin1 encoding which might be correct or not, but at least preserves the original byte sequence by mapping each byte to the corresponding unicode code point in the range U+0000 to U+00FF.

Otherwise, a simple unicode() conversion is attempted, with some special care taken for Exception objects.

Table Of Contents

Previous topic

development Package

Next topic

shell Package

This Page