Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mozillazg/hello-python-plugin
尝试实现简单的插件功能。
https://github.com/mozillazg/hello-python-plugin
Last synced: 13 days ago
JSON representation
尝试实现简单的插件功能。
- Host: GitHub
- URL: https://github.com/mozillazg/hello-python-plugin
- Owner: mozillazg
- Created: 2013-08-08T06:46:48.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-08-08T13:09:15.000Z (over 11 years ago)
- Last Synced: 2024-12-12T16:44:42.451Z (about 1 month ago)
- Language: Python
- Size: 50.8 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#尝试实现简单的插件功能
$ python main.py -h
usage: main.py [-h] [--enable PLUGINS]optional arguments:
-h, --help show this help message and exit
--enable PLUGINS enable some plugins (default: [])默认输出:
$ python main.py
Default: test plugin.启用插件 foo:
$ python main.py --enable foo
Default: test plugin.
Plugin foo: test plugin.启用插件 foo, bar:
$ python main.py --enable foo --enable bar
Default: test plugin.
Plugin bar: test plugin.
Plugin foo: test plugin.