From f6218d20324471673f6c8f2ae623fa37c1bd7a47 Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Mon, 7 Nov 2022 20:26:06 +0000 Subject: [PATCH] add scripts.py --- pyproject.toml | 4 ++-- scripts.py | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 scripts.py diff --git a/pyproject.toml b/pyproject.toml index 776c3d0..f0f6b1c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/scripts.py b/scripts.py new file mode 100644 index 0000000..f1da85f --- /dev/null +++ b/scripts.py @@ -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)])