Ensure users python folder is on path

Fix import of expressions if we have to make the the python\expressions
folders
This commit is contained in:
Nathan Woodrow 2015-01-20 09:54:30 +10:00
parent 295f466d23
commit 51bb80329c

View File

@ -23,6 +23,8 @@ userpythonhome = os.path.join(QgsApplication.qgisSettingsDirPath(), "python")
expressionspath = os.path.join(userpythonhome, "expressions")
startuppy = os.path.join(userpythonhome, "startup.py")
sys.path.append(userpythonhome)
# exec startup script
if os.path.exists(startuppy):
execfile(startuppy, locals(), globals())