File: foo

package info (click to toggle)
pyqi 0.3.2%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 504 kB
  • sloc: python: 2,716; makefile: 133
file content (31 lines) | stat: -rw-r--r-- 937 bytes parent folder | download | duplicates (6)
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