21 lines
468 B
Python
21 lines
468 B
Python
from commands import BaseCommand, register_cmd
|
|
|
|
@register_cmd
|
|
class example_cmd(BaseCommand):
|
|
|
|
def __call__(self, *args, **kwargs):
|
|
def input_generator():
|
|
yield 'example'
|
|
yield 'command'
|
|
return input_generator
|
|
|
|
|
|
@register_cmd
|
|
class echo(BaseCommand):
|
|
|
|
def __call__(self, *args, **kwargs):
|
|
def input_generator():
|
|
for line in self.input_cmd():
|
|
yield line
|
|
return input_generator
|