diff --git a/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java b/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java index e2ed871a11..c9175f3754 100755 --- a/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java +++ b/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java @@ -68,11 +68,19 @@ public final class JythonModuleLoader { } private static List getInterfaceImplementations(LineFilter filter, Class interfaceClass) { - PythonInterpreter interpreter = new PythonInterpreter(); List objects = new ArrayList<>(); - File pythonModulesDir = new File(PlatformUtil.getUserPythonModulesPath()); - File[] files = pythonModulesDir.listFiles(); - for (File file : files) { + Set pythonModuleDirs = new HashSet<>(); + PythonInterpreter interpreter = new PythonInterpreter(); + + // add python modules from 'autospy/build/cluster/InternalPythonModules' folder + // which are copied from 'autopsy/*/release/InternalPythonModules' folders. + for (File f : InstalledFileLocator.getDefault().locateAll("InternalPythonModules", JythonModuleLoader.class.getPackage().getName(), false)) { //NON-NLS + Collections.addAll(pythonModuleDirs, f.listFiles()); + } + // add python modules from 'testuserdir/python_modules' folder + Collections.addAll(pythonModuleDirs, new File(PlatformUtil.getUserPythonModulesPath()).listFiles()); + + for (File file : pythonModuleDirs) { if (file.isDirectory()) { File[] pythonScripts = file.listFiles(new PythonScriptFileFilter()); for (File script : pythonScripts) {