summaryrefslogtreecommitdiff
path: root/plac/doc/example13.py
diff options
context:
space:
mode:
Diffstat (limited to 'plac/doc/example13.py')
-rw-r--r--plac/doc/example13.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/plac/doc/example13.py b/plac/doc/example13.py
deleted file mode 100644
index 9982fdd..0000000
--- a/plac/doc/example13.py
+++ /dev/null
@@ -1,28 +0,0 @@
-import plac
-
-class FVCS(object):
- "A Fake Version Control System"
- commands = 'checkout', 'commit', 'status', 'help'
- add_help = True
-
- @plac.annotations(
- name=('a recognized command', 'positional', None, str, commands))
- def help(self, name):
- print(plac.parser_from(self).help_cmd(name))
-
- @plac.annotations(
- url=('url of the source code', 'positional'))
- def checkout(self, url):
- print('checkout', url)
-
- def commit(self):
- print('commit')
-
- @plac.annotations(quiet=('summary information', 'flag'))
- def status(self, quiet):
- print('status', quiet)
-
-main = FVCS()
-
-if __name__ == '__main__':
- plac.call(main)