From: vsv Date: Tue, 17 Jan 2017 08:42:29 +0000 (+0300) Subject: Issue #1896: Add a script for modules inspection X-Git-Tag: V_2.7.0~334 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=388d22052606f091fffd33522607c796336b6c47;p=modules%2Fshaper.git Issue #1896: Add a script for modules inspection --- diff --git a/src/PythonAPI/CMakeLists.txt b/src/PythonAPI/CMakeLists.txt index 1b837d2ac..f68c87258 100644 --- a/src/PythonAPI/CMakeLists.txt +++ b/src/PythonAPI/CMakeLists.txt @@ -3,6 +3,7 @@ INSTALL(DIRECTORY geom model examples DESTINATION ${SHAPER_INSTALL_PYTHON_API}) INSTALL(FILES __init__.py DESTINATION ${SHAPER_INSTALL_PYTHON_API}) INSTALL(FILES __init__.py DESTINATION ${_pydir}/salome) +INSTALL(FILES initConfig.py DESTINATION ${SHAPER_INSTALL_PYTHON_API}) # --------- Unit tests ----------- INCLUDE(UnitTest) diff --git a/src/PythonAPI/initConfig.py b/src/PythonAPI/initConfig.py new file mode 100644 index 000000000..6e130ee0c --- /dev/null +++ b/src/PythonAPI/initConfig.py @@ -0,0 +1,13 @@ +"""This script inspects existing modules in SALOME and registrs them in +Module reader +""" + +import salome +import SALOME_ModuleCatalog +import ConfigAPI + +obj = salome.naming_service.Resolve('Kernel/ModulCatalog') +catalog = obj._narrow(SALOME_ModuleCatalog.ModuleCatalog) +aCorbaModules = catalog.GetComponentList() +for aName in aCorbaModules: + ConfigAPI.Config_ModuleReader.addDependencyModule(aName)