This repository has been archived on 2015-04-29. You can view files and clone it, but cannot push or open issues or pull requests.
psh/example_cmd.py
2015-02-20 18:27:21 -05:00

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