Create an alias called name that executes command. The command must not be enclosed in quotes. Replaceable parameters can be indicated by "%1", "%2", and so on, while "%*" is replaced by all the parameters. If no command is given, the current alias for name is shown. If no arguments are given, all aliases are listed.
Aliases may be nested and can contain anything that can be legally
typed at the pydb
prompt. Note that internal pydb
commands can be overridden by aliases. Such a command is then hidden
until the alias is removed. Aliasing is recursively applied to the
first word of the command line; all other words in the line are left
alone.
As an example, here are two useful aliases (especially when placed
in the .pydbrc
file):
#Print instance variables (usage "pi classInst") alias pi for k in %1.__dict__.keys(): print "%1.",k,"=",%1.__dict__[k] #Print instance variables in self alias ps pi self
If
readline
or one of readline-compatible interfaces such as
pyreadline
are available on your OS, the complete
command will print a
list of command names that start with command-prefix.
complete
will also work on info
, set
, and
show
sub-command.
In addition the command-completion key (usually the tab key) can be
used to complete command names, or info
, set
, and
show
subcommands.
Without argument, print the list of available commands. With command as argument, print help about that command. "help pydb" displays the full documentation file; if the environment variable PAGER is defined, the file is piped through that command. Since the command argument must be an identifier, "help exec" must be entered to get help on the "!" command.
Some commands, info
, set
, and show
can accept an
additional subcommand to give help just about that particular
subcommand. For example help info line
give help about the
info line
command.
Quit the debugger. The program being executed is aborted. For now,
kill
is a synonym for quit.
Delete the specified alias.
See About this document... for information on suggesting changes.