venvmod.commands.create_module module
Commands to create a modulefile.
- venvmod.commands.create_module.initialize(virtual_env: Path = None, version_or_path: str = '5.6.0', read_env: bool = False) int[source]
Initialize a venv-modulefile environment
- Parameters:
virtual_env (Path, optional) – If None, arguments are read from
venvmod.commands.get_parser()function, else the path to the virtual env, by default Noneversion_or_path (str, optional) – Modulefile version to use if not found or version < 4.6. It can be a source directory to avoid donloading, by default “5.6.0”
read_env (bool, optional) – Read environment variables associated to the appli, by default False
- Returns:
return code
- Return type:
- venvmod.commands.create_module.rm_appli(virtual_env: Path = None, applis: List[str] = None) int[source]
Remove application modulefiles to the environment.
This call also use the
venvmod.commands.append_module.read_env()function for each appli.- Parameters:
virtual_env (Path, optional) – If None, arguments are read from
venvmod.commands.get_parser()function, else the path to the virtual env, by default Noneapplis (List[str], optional) – List of module file to remove in addition to those given through cli, by default None
- venvmod.commands.create_module.add_appli(virtual_env: Path = None, applis: List[str] = None, read_env: bool = False, disconnect: bool = False) int[source]
Add application modulefiles to the environment.
This call also use the
venvmod.commands.append_module.read_env()function for each appli.- Parameters:
virtual_env (Path, optional) – If None, arguments are read from
venvmod.commands.get_parser()function, else the path to the virtual env, by default Noneapplis (List[str], optional) – List of module file to create in addition to those given through cli, by default None
read_env (bool, optional) – Read environment variables associated to the appli, by default False
disconnect (bool, optional) – True to avoid loading appli when virtual env is loaded, by default False