Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

modulepath

Returns path of a module.

Syntax

  • p = modulepath(module_short_name)
  • p = modulepath(module_short_name, option)

Input argument

  • module_short_name or 'nelson' - a string: short module's name. module must exist in nelson session.
  • option - a string: 'etc', 'bin', 'root', 'builtin', 'tests'.

Output argument

  • p - a string: path or subpath of the module.

Description

modulepath is an helper's function to return module root path or a subdirectory.

modulepath('nelson') is equivalent to modulepath('nelson', 'root')

modulepath('nelson', 'bin') return path of nelson's executables.

modulepath('nelson', 'builtin') returns path of nelson's dynamic libraries.

Example

modulepath('core')
modulepath('core', 'root')
modulepath('core', 'etc')
modulepath('core', 'bin')
modulepath('core', 'builtin')
modulepath('core', 'tests')
modulepath('nelson', 'root')
modulepath('nelson', 'bin')
modulepath('nelson', 'builtin')

See also

requiremodule, getmodules.

History

VersionDescription
1.0.0initial version

Author

Allan CORNET