diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2018-05-19 14:41:50 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-19 14:41:50 -0400 |
| commit | 9dadd836e2f09b0216f7b40c782e2b55bcc90dee (patch) | |
| tree | 128b6f13ea682a8e5a033370ab2e13388801f100 /lib/utils/inkscape.py | |
| parent | ba7288d8fcd62678bd17d8fab01d0d488d9e21e8 (diff) | |
| parent | 6fe417cd64090f028c0d07b799620eb94637bf33 (diff) | |
Merge pull request #163 from lexelby/lexelby-single-extension
single code entry point
Diffstat (limited to 'lib/utils/inkscape.py')
| -rw-r--r-- | lib/utils/inkscape.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/utils/inkscape.py b/lib/utils/inkscape.py new file mode 100644 index 00000000..2d0298bc --- /dev/null +++ b/lib/utils/inkscape.py @@ -0,0 +1,15 @@ +from os.path import realpath, expanduser, join as path_join +import sys + +def guess_inkscape_config_path(): + if getattr(sys, 'frozen', None): + path = realpath(path_join(sys._MEIPASS, "..", "..", "..")) + if sys.platform == "win32": + import win32api + + # This expands ugly things like EXTENS~1 + path = win32api.GetLongPathName(path) + else: + path = expanduser("~/.config/inkscape") + + return path |
