From b9a07509d4d6e51ba6606bb1f245979b5957d96e Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 10 Dec 2011 11:24:27 +0000 Subject: [PATCH] 0000504: Include macro directory as part of default python path git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5248 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d --- src/App/FreeCADInit.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/App/FreeCADInit.py b/src/App/FreeCADInit.py index c495ec6b9..6a2f100dc 100644 --- a/src/App/FreeCADInit.py +++ b/src/App/FreeCADInit.py @@ -50,8 +50,8 @@ def InitApplications(): AddPath = FreeCAD.ConfigGet("AdditionalModulePaths").split(";") HomeMod = FreeCAD.ConfigGet("UserAppData")+"Mod" HomeMod = os.path.realpath(HomeMod) - MacroMod = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Macro").GetString("MacroPath")+"/Mod" - MacroMod = os.path.realpath(MacroMod) + MacroDir = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Macro").GetString("MacroPath") + MacroMod = os.path.realpath(MacroDir+"/Mod") ModPar = FreeCAD.ParamGet("System parameter:Modules") #print FreeCAD.getHomePath() @@ -111,6 +111,8 @@ def InitApplications(): Log("System path after init:\n") for i in path: Log(" " + i + "\n") + # add MacroDir to path (RFE #0000504) + sys.path.append(MacroDir) # add special path for MacOSX (bug #0000307) import platform if len(platform.mac_ver()[0]) > 0: