1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#!/usr/bin/env python
from __future__ import division
__author__ = "b"
__copyright__ = "y"
__credits__ = ["b"]
__license__ = "x"
__version__ = "1.0"
__maintainer__ = "b"
__email__ = "c"
from pyqi.core.command import Command, Parameter, ParameterCollection
class a(Command):
BriefDescription = "FILL IN A 1 SENTENCE DESCRIPTION"
LongDescription = "GO INTO MORE DETAIL"
Parameters = ParameterCollection([
Parameter(Name='foo', DataType=str,
Description='some required parameter', Required=True),
Parameter(Name='bar', DataType=int,
Description='some optional parameter', Required=False,
Default=1)
])
def run(self, **kwargs):
# EXAMPLE:
# return {'result_1': kwargs['foo'] * kwargs['bar'],
# 'result_2': "Some output bits"}
raise NotImplementedError("You must define this method")
CommandConstructor = a
|