diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 714bd83af9..67aa53a8d2 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -2631,11 +2631,12 @@ std::list Application::processFiles(const std::list& f processed.push_back(*it); } else if (file.hasExtension("py")) { - try{ + try { + Base::Interpreter().addPythonPath(file.dirPath().c_str()); Base::Interpreter().loadModule(file.fileNamePure().c_str()); processed.push_back(*it); } - catch(const PyException&) { + catch (const PyException&) { // if loading the module does not work, try just running the script (run in __main__) Base::Interpreter().runFile(file.filePath().c_str(),true); processed.push_back(*it);