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. |
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']