diff options
author | kotfu <kotfu@kotfu.net> | 2018-06-03 12:53:05 -0600 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2018-06-03 12:53:05 -0600 |
commit | e5a0f306a16bb06406ba3c6f88821bfe6c8ca738 (patch) | |
tree | 86d8ecf0839491b7fa29629326886aa9fe0b366b /cmd2/plugin.py | |
parent | eaf7415f010ab82688a0a30627a0efa2419f2837 (diff) | |
download | cmd2-git-e5a0f306a16bb06406ba3c6f88821bfe6c8ca738.tar.gz |
Begin converting precmd to passing and returning a data object
Diffstat (limited to 'cmd2/plugin.py')
-rw-r--r-- | cmd2/plugin.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cmd2/plugin.py b/cmd2/plugin.py new file mode 100644 index 00000000..47f4a514 --- /dev/null +++ b/cmd2/plugin.py @@ -0,0 +1,21 @@ +# +# coding=utf-8 +"""Classes for the cmd2 plugin system""" +import attr + +@attr.s +class PostparsingData(): + stop = attr.ib() + statement = attr.ib() + +@attr.s +class PrecommandData(): + statement = attr.ib() + +@attr.s +class PostcommandData(): + stop = attr.ib(default=False) + +@attr.s +class CommandFinalizationData(): + stop = attr.ib(default=False) |