evennia.commands.default.batchprocess

Batch processors

These commands implements the ‘batch-command’ and ‘batch-code’ processors, using the functionality in evennia.utils.batchprocessors. They allow for offline world-building.

Batch-command is the simpler system. This reads a file (*.ev) containing a list of in-game commands and executes them in sequence as if they had been entered in the game (including permission checks etc).

Batch-code is a full-fledged python code interpreter that reads blocks of python code (*.py) and executes them in sequence. This allows for much more power than Batch-command, but requires knowing Python and the Evennia API. It is also a severe security risk and should therefore always be limited to superusers only.

class evennia.commands.default.batchprocess.CmdBatchCommands(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

build from batch-command file

Usage:

batchcommands[/interactive] <python.path.to.file>

Switch:
interactive - this mode will offer more control when

executing the batch file, like stepping, skipping, reloading etc.

Runs batches of commands from a batch-cmd text file (*.ev).

key = 'batchcommands'
aliases = ['batchcommand', 'batchcmd']
switch_options = ('interactive',)
locks = 'cmd:perm(batchcommands) or perm(Developer)'
help_category = 'building'
func()[source]

Starts the processor.

lock_storage = 'cmd:perm(batchcommands) or perm(Developer)'
search_index_entry = {'aliases': 'batchcommand batchcmd', 'category': 'building', 'key': 'batchcommands', 'no_prefix': ' batchcommand batchcmd', 'tags': '', 'text': '\n build from batch-command file\n\n Usage:\n batchcommands[/interactive] <python.path.to.file>\n\n Switch:\n interactive - this mode will offer more control when\n executing the batch file, like stepping,\n skipping, reloading etc.\n\n Runs batches of commands from a batch-cmd text file (*.ev).\n\n '}
class evennia.commands.default.batchprocess.CmdBatchCode(**kwargs)[source]

Bases: evennia.commands.default.muxcommand.MuxCommand

build from batch-code file

Usage:

batchcode[/interactive] <python path to file>

Switch:
interactive - this mode will offer more control when

executing the batch file, like stepping, skipping, reloading etc.

debug - auto-delete all objects that has been marked as

deletable in the script file (see example files for syntax). This is useful so as to to not leave multiple object copies behind when testing out the script.

Runs batches of commands from a batch-code text file (*.py).

key = 'batchcode'
aliases = ['batchcodes']
switch_options = ('interactive', 'debug')
locks = 'cmd:superuser()'
help_category = 'building'
func()[source]

Starts the processor.

lock_storage = 'cmd:superuser()'
search_index_entry = {'aliases': 'batchcodes', 'category': 'building', 'key': 'batchcode', 'no_prefix': ' batchcodes', 'tags': '', 'text': '\n build from batch-code file\n\n Usage:\n batchcode[/interactive] <python path to file>\n\n Switch:\n interactive - this mode will offer more control when\n executing the batch file, like stepping,\n skipping, reloading etc.\n debug - auto-delete all objects that has been marked as\n deletable in the script file (see example files for\n syntax). This is useful so as to to not leave multiple\n object copies behind when testing out the script.\n\n Runs batches of commands from a batch-code text file (*.py).\n\n '}