l.s.m.commands : module documentation

Part of lp.services.mail

No module docstring
Function normalize_arguments Normalizes the string arguments.
Class EmailCommand Represents a command.
Class EditEmailCommand Helper class for commands that edits the context.
Class NoSuchCommand A command with the given name couldn't be found.
Class EmailCommandCollection A collection of email commands.
def normalize_arguments(string_args):

Normalizes the string arguments.

The string_args argument is simply the argument string whitespace splitted. Sometimes arguments may be quoted, though, so that they can contain space characters. For example "This is a long string".

This function loops through all the argument and joins the quoted strings into a single arguments.

>>> normalize_arguments(['"This', 'is', 'a', 'long', 'string."'])
['This is a long string.']
>>> normalize_arguments(
...     ['"First', 'string"', '"Second', 'string"', 'foo'])
['First string', 'Second string', 'foo']
API Documentation for Launchpad, generated by pydoctor at 2020-08-03 00:00:06.