diff options
| author | tassaron | 2017-07-23 01:53:54 -0400 |
|---|---|---|
| committer | tassaron | 2017-07-23 01:53:54 -0400 |
| commit | bf0890e7c87c730b8970c1a20c5b6a9a1a55d203 (patch) | |
| tree | bc66d222a5f04598db97df419f5affa35b723f6f /src/__init__.py | |
| parent | 450b944b87487aa60a935bbeee3908e2a62cd45b (diff) | |
components auto-connect & track widgets, less autosave spam
importing toolkit from live interpreter now works
Diffstat (limited to 'src/__init__.py')
| -rw-r--r-- | src/__init__.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/__init__.py b/src/__init__.py index 8b13789..2f4cffa 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -1 +1,13 @@ +import sys +import os + +if getattr(sys, 'frozen', False): + # frozen + wd = os.path.dirname(sys.executable) +else: + # unfrozen + wd = os.path.dirname(os.path.realpath(__file__)) + +# make relative imports work when using /src as a package +sys.path.insert(0, wd) |
