GitXplorerGitXplorer
m

hello-python-plugin

public
3 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
7d93314e6f0c903a31fb3b7e2df3b813ea0b3a5f

清理代码,添加更多的注释.

mmozillazg committed 11 years ago
Unverified
be763db619097f8ac5fc9accefbaa689f49179b5

隐藏因插件目录不存在而导致的异常信息.

mmozillazg committed 11 years ago
Unverified
09c683ae6d315638601ff64aa1228f81b342eaee

为 find_modules 添加 silent 参数:控制是否需要输出异常信息.

mmozillazg committed 11 years ago
Unverified
58b63ba63e2e678c62b48d44745580ba35ff84b4

Updated README.md

mmozillazg committed 11 years ago
Unverified
a9569f441db9e25ebb1ec6fae57e97272667a971

添加命令行选项(--enable)控制启用哪些插件。

mmozillazg committed 11 years ago
Unverified
affe6640094e86335afb70ca3fb6f09d124b0ac3

实现简单的插件功能.

mmozillazg committed 11 years ago

README

The README file for this repository.

#尝试实现简单的插件功能

$ 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.