add basic argv read
This commit is contained in:
parent
e7b071f96e
commit
cb6008c385
3 changed files with 14 additions and 2 deletions
1
examples/hello.scri
Normal file
1
examples/hello.scri
Normal file
|
@ -0,0 +1 @@
|
|||
noop
|
|
@ -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)
|
||||
|
|
4
setup.py
4
setup.py
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue