diff options
author | Aineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi> | 2024-02-17 10:06:54 +0200 |
---|---|---|
committer | Aineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi> | 2024-02-17 10:06:54 +0200 |
commit | 78eeeac7bd114163418bf5da2897aed62794a09f (patch) | |
tree | 812bb8ebfebd01560522c60f79bc1a5617d6a741 | |
parent | 924c83b31ceec6a33035f13429f43b5b7e702feb (diff) |
Root directory can be now run in any cwd.v0.1-delta
-rw-r--r-- | __main__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/__main__.py b/__main__.py index 4a91b1e..c8fa693 100644 --- a/__main__.py +++ b/__main__.py @@ -1,3 +1,6 @@ """ __main__.py - Käynnistellään ohjelma src/miinaharava kansiosta """ from runpy import run_path -run_path("src/miinaharava", run_name="miinaharava") +from pathlib import Path + +my_path = Path(__file__).parent.resolve() +run_path(f"{my_path}/src/miinaharava", run_name="miinaharava") |