common.command.util

Utility functions used in command sub-package.

lmi.scripts.common.command.util.RE_COMMAND_NAME = <_sre.SRE_Pattern object at 0x327e180>

Command name can also be a single or double dash.

lmi.scripts.common.command.util.RE_OPT_BRACKET_ARGUMENT = <_sre.SRE_Pattern object at 0x27dc570>

Regular expression matching bracket argument such as <arg_name>.

lmi.scripts.common.command.util.RE_OPT_LONG_OPTION = <_sre.SRE_Pattern object at 0x3613688>

Regular expression matching long options (prefixed with double dash).

lmi.scripts.common.command.util.RE_OPT_SHORT_OPTION = <_sre.SRE_Pattern object at 0x361c030>

Regular expression matching showt options. They are one character long, prefixed with single dash.

lmi.scripts.common.command.util.RE_OPT_UPPER_ARGUMENT = <_sre.SRE_Pattern object at 0x24544a0>

Regular expression matching argument written in upper case such as ARG_NAME.

lmi.scripts.common.command.util.is_abstract_method(clss, method, missing_is_abstract=False)[source]

Check, whether the given method is abstract in given class or list of classes. May be used to check, whether we should override particular abstract method in a meta-class in case that no non-abstract implementation is defined.

Parameters:
  • clss (type or tuple) – Class or list of classes that is searched for non-abstract implementation of particular method. If the first class having particular method in this list contain non-abstract implementation, False is returned.
  • method (string) – Name of method to look for.
  • missing_is_abstract (boolean) – This is a value returned, when not such method is defined in a set of given classes.
Returns:

Are all occurences of given method abstract?

Return type:

boolean

Previous topic

common.command.show

Next topic

common.configuration

This Page