2018-04-21 02:49:05 +00:00
|
|
|
from os.path import realpath, expanduser, join as path_join
|
|
|
|
import sys
|
|
|
|
|
2018-08-22 00:32:50 +00:00
|
|
|
|
2018-04-21 02:49:05 +00:00
|
|
|
def guess_inkscape_config_path():
|
|
|
|
if getattr(sys, 'frozen', None):
|
2018-04-26 00:55:17 +00:00
|
|
|
path = realpath(path_join(sys._MEIPASS, "..", "..", ".."))
|
|
|
|
if sys.platform == "win32":
|
|
|
|
import win32api
|
|
|
|
|
|
|
|
# This expands ugly things like EXTENS~1
|
|
|
|
path = win32api.GetLongPathName(path)
|
2018-04-21 02:49:05 +00:00
|
|
|
else:
|
|
|
|
path = expanduser("~/.config/inkscape")
|
|
|
|
|
|
|
|
return path
|