refactor py/lib into python-scwrypts subproject

This commit is contained in:
2024-02-18 02:30:58 -07:00
parent d4ef1c70e0
commit 3bcd4f3f6d
58 changed files with 719 additions and 331 deletions

View File

@ -1,27 +1,21 @@
#!/usr/bin/env python
from py.lib.scwrypts import execute
from py.lib.scwrypts.exceptions import ImportedExecutableError
if __name__ != '__main__':
raise ImportedExecutableError()
from scwrypts import execute
#####################################################################
description = 'a simple "Hello, World!" program'
parse_args = [
( ['-m', '--message'], {
'dest' : 'message',
'default' : 'HELLO WORLD',
'help' : 'message to print',
'required' : False,
}),
]
def main(args, stream):
stream.writeline(args.message)
#####################################################################
execute(main,
description = 'a simple "Hello, World!" program',
parse_args = [
( ['-m', '--message'], {
'dest' : 'message',
'default' : 'HELLO WORLD',
'help' : 'message to print',
'required' : False,
}),
],
)
if __name__ == '__main__':
execute(main, description, parse_args)