13. Layer root¶
13.1. Overview¶
This is the root
layer of the MFBASE module.
This layer mainly includes core libraries and utilities like :
layerapi2 library and utilities which manage the layer system
wrappers (
python3
,python
…)(and some other documented below)
The root
layer is loaded by default and does not depend on another layer. This
is the layer dependencies root.
13.2. Special focus on python wrappers¶
13.2.1. python3 wrapper¶
The python3
wrapper is available in ${MFEXT_HOME}/bin
. It executes
a python3 interpreter with following layers loaded :
python3@mfext
(if installed)python3@mfcom
(if installed)scientific_core@mfext ` (if installed)
python3@{current_module}
(if installed)
So, if you want to execute a python3 script without any question about currently loaded layers, this is the way to go.
For example:
#!/usr/bin/env python3
print("this code will be always executed in python3 environment")
print("(thanks to the above python3 shebang)")
or
python3 /path/to/a/python3/script.py
13.2.2. python wrapper¶
The python
wrapper is available in ${MFEXT_HOME}/bin
. It works exactly
as the above wrappers. But the major python version is selected with
the METWORK_PYTHON_MODE
environment variable.
13.4. Utilities¶
13.4.1. mfbase.start¶
usage mfbase.start [NOINIT]
=> start the mfbase module
13.4.2. mfbase.stop¶
usage mfbase.start
=> stop the mfbase module
13.4.3. mfbase.status¶
usage mfbase.status
=> test the mfbase module
13.4.4. mfbase.init¶
usage: mfbase.init
=> (re)init your module (WARNING: can't drop some user provided datas)
13.4.5. mfbase_wrapper¶
usage: /opt/metwork-mfbase-0.8/bin/mfbase_wrapper COMMAND_TO_WRAP [COMMAND_ARG1] [COMMAND_ARG2] [...]
=> launch the given command within metwork/mfbase environnent
=> note: the current environnent is cleared before
=> (only MODULE_RUNTIME_SUFFIX, MODULE_RUNTIME_HOME and some standard env var (HOME, TERM, DISPLAY...)
are keeped intact)