From a613be9a0b03e4bba4fd9125638b44431707fedd Mon Sep 17 00:00:00 2001 From: Jared Duffey Date: Fri, 30 Aug 2024 08:36:38 -0400 Subject: [PATCH] ENH: Clear method of ManualImportFinder exposed to Python (#1060) Signed-off-by: Jared Duffey --- .../python/NxPythonEmbed/NxPythonEmbed/NxPythonEmbed.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wrapping/python/NxPythonEmbed/NxPythonEmbed/NxPythonEmbed.hpp b/wrapping/python/NxPythonEmbed/NxPythonEmbed/NxPythonEmbed.hpp index ef774df1e6..6182bba40b 100644 --- a/wrapping/python/NxPythonEmbed/NxPythonEmbed/NxPythonEmbed.hpp +++ b/wrapping/python/NxPythonEmbed/NxPythonEmbed/NxPythonEmbed.hpp @@ -123,6 +123,11 @@ class ManualImportFinderHolder py::list(sys.attr("meta_path")).append(m_Finder); } + void clear() + { + m_Finder.attr("clear")(); + } + static ManualImportFinderHolder GetFromMetaPath() { auto sys = py::module_::import("sys");