add scripts.py

This commit is contained in:
onyx-and-iris 2022-11-07 20:26:06 +00:00
parent 4aacc60857
commit f6218d2032
2 changed files with 14 additions and 2 deletions

View File

@ -24,5 +24,5 @@ requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
obs = "examples.obs.__main__:main"
observer = "examples.observer.__main__:main"
obs = "scripts:ex_obs"
observer = "scripts:ex_observer"

12
scripts.py Normal file
View File

@ -0,0 +1,12 @@
import subprocess
from pathlib import Path
def ex_obs():
path = Path.cwd() / "examples" / "obs" / "."
subprocess.run(["py", str(path)])
def ex_observer():
path = Path.cwd() / "examples" / "observer" / "."
subprocess.run(["py", str(path)])