aboutsummaryrefslogtreecommitdiff
path: root/src/__init__.py
diff options
context:
space:
mode:
authorBrianna2017-07-27 22:47:40 -0400
committerGitHub2017-07-27 22:47:40 -0400
commitae2af28808816d67e964b63bee1b5dbc18073672 (patch)
tree93818b30c43761288e0414e620e27871ac32cc8d /src/__init__.py
parentc799305eff66432d1d42ff3a8d1b7fd24448e1b6 (diff)
parent6ecb6df23628de65c9efd8cac4810fdf74238c3d (diff)
Merge pull request #49 from djfun/toolkit
Code reorganization, more readable component code, better error messages
Diffstat (limited to 'src/__init__.py')
-rw-r--r--src/__init__.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/__init__.py b/src/__init__.py
index e69de29..2f4cffa 100644
--- a/src/__init__.py
+++ b/src/__init__.py
@@ -0,0 +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)