add basic argv read

This commit is contained in:
Luna 2019-06-06 17:39:47 -03:00
parent e7b071f96e
commit cb6008c385
3 changed files with 14 additions and 2 deletions

1
examples/hello.scri Normal file
View File

@ -0,0 +1 @@
noop

View File

@ -1,2 +1,11 @@
import sys
from pathlib import Path
def main():
print('hello world')
try:
scri_path = Path(sys.argv[1]).resolve()
except IndexError:
print(f'usage: {sys.argv[0]} path/to/file.scri')
return
print('path', scri_path)
#run(scri_path)

View File

@ -4,7 +4,9 @@ setup(
name='scritcher',
version='0.1',
py_modules=['scritcher'],
install_requires=[],
install_requires=[
'Pillow==6.0.0',
],
entry_points='''
[console_scripts]
scritcher=scritcher:main