Returns a help string for a given module.
518812
def _render_our_module_flags(self, module, output_lines, prefix=''):
    """"""
    flags = self._get_flags_defined_by_module(module)
    if flags:
      self._render_module_flags(module, flags, output_lines, prefix)
1281292
@Override
    public void indexHelpModule(HelpModule helpModule) {
        try {
            if (indexTracker.isSame(helpModule)) {
                return;
            }
            
            unindexHelpModule(helpModule);
            log.info("Indexing help module " + helpModule.getLocalizedId());
            int i = helpModule.getUrl().lastIndexOf('/');
            String pattern = "classpath:" + helpModule.getUrl().substring(0, i + 1) + "*.htm*";
            
            for (Resource resource : appContext.getResources(pattern)) {
                indexDocument(helpModule, resource);
            }
            
            writer.commit();
            indexTracker.add(helpModule);
        } catch (Exception e) {
            throw MiscUtil.toUnchecked(e);
        }
    }
164421
def get_help_text(self):
        

        txt = str('\n')
        for name, info in self.commands.items():
            command_txt = "\t{0: <22} {1}\n".format(name, info['description'])
            if info['attributes']:
                command_txt = ''.join([command_txt, "\t Attributes:\n"])
                for attrname, attrdesc in info['attributes'].items():
                    attr_txt = "\t  {0: <22} {1}\n".format(attrname, attrdesc)
                    command_txt = ''.join([command_txt, attr_txt])
            if info['elements']:
                command_txt = ''.join([command_txt, "\t Elements:\n",
                                       self.elements_as_text(info['elements'])])
            txt = ''.join([txt, command_txt])
        return txt
625475
def get_string_module(project, code, resource=None, force_errors=False):
    
    return pyobjectsdef.PyModule(project.pycore, code, resource,
                                 force_errors=force_errors)
855926
function getHelp() {
  if (HelpText) return HelpText

  var helpFile = path.join(__dirname, utils.COMMAND + ".help.txt" )
  var content  = fs.readFileSync(helpFile, "utf8")

  content = content.replace(/%COMMAND%/g,     utils.COMMAND    )
  content = content.replace(/%PACKAGE%/g,     utils.PACKAGE    )
  content = content.replace(/%VERSION%/g,     utils.VERSION    )
  content = content.replace(/%DESCRIPTION%/g, utils.DESCRIPTION)
  content = content.replace(/%HOMEPAGE%/g,    utils.HOMEPAGE   )

  HelpText = content
  return HelpText
}
587704
def get_module(mod_name):
    
    if mod_name is '':
        raise ImportError('Unable to import empty module')

    mod = __import__(mod_name)
    components = mod_name.split('.')

    for comp in components[1:]:
        mod = getattr(mod, comp)

    return mod
820783
def get_module_path(exc_type):
    
    module = inspect.getmodule(exc_type)
    return "{}.{}".format(module.__name__, exc_type.__name__)
411163
def get_function_source(ft, **kwargs)->str:
    ""
    try: line = inspect.getsourcelines(ft)[1]
    except Exception: return ''
    mod_path = get_module_name(ft).replace('.', '/') + '.py'
    return get_source_link(mod_path, line, **kwargs)
40897
def main_module_name() -> str:
    """"""
    if not hasattr(main_module, '__file__'):
        # running from interactive shell
        return None

    main_filename = os.path.basename(main_module.__file__)
    module_name, ext = os.path.splitext(main_filename)
    return module_name
507737
public static function getModule($module) {
        $info = null;
        if (isset (self::$modules [ $module ])) {
            return self::$modules [ $module ];
        }

        return $info;
    }
200
def find_module(modpath):
    """"""
    module_path = modpath.replace('.', '/') + '.py'
    init_path = modpath.replace('.', '/') + '/__init__.py'
    for root_path in sys.path:
        path = os.path.join(root_path, module_path)
        if os.path.isfile(path):
            return path
        path = os.path.join(root_path, init_path)
        if os.path.isfile(path):
            return path
687590
def get_module_path(modname):
    """"""
    return osp.abspath(osp.dirname(sys.modules[modname].__file__))
43492
def getHelpAsString(docstring=False, show_ver=True):
    
    install_dir = os.path.dirname(__file__)
    taskname = util.base_taskname(__taskname__, __package__)
    htmlfile = os.path.join(install_dir, 'htmlhelp', taskname + '.html')
    helpfile = os.path.join(install_dir, taskname + '.help')

    if docstring or (not docstring and not os.path.exists(htmlfile)):
        if show_ver:
            helpString = "\n{:s} Version {:s} updated on {:s}\n\n".format(
                __taskname__, __version__, __version_date__
            )
        else:
            helpString = ''

        if os.path.exists(helpfile):
            helpString += teal.getHelpFileAsString(taskname, __file__)
        elif __doc__ is not None:
                helpString += __doc__ + os.linesep

    else:
        helpString = 'file://' + htmlfile

    return helpString
1087533
def show_help(fd=sys.stdout):
    '''
    
    '''
    with Modules() as m:
        fd.write(m.help())
252256
Module findModuleFromPackageName(String pkg) {
        int cp = pkg.indexOf(':');
        assert(cp != -1);
        String mod = pkg.substring(0, cp);
        return lookupModule(mod);
    }
1238524
def find_module(module, paths=None):
    """"""

    parts = module.split('.')

    while parts:
        part = parts.pop(0)
        f, path, (suffix, mode, kind) = info = imp.find_module(part, paths)

        if kind == PKG_DIRECTORY:
            parts = parts or ['__init__']
            paths = [path]

        elif parts:
            raise ImportError("Can't find %r in %s" % (parts, module))

    return info
707932
function getHelper() {
    let helper;

    if (editor.isViewer()) {
      helper = vmh;
    } else if (editor.isWysiwygMode()) {
      helper = wmh;
    } else {
      helper = mmh;
    }

    return helper;
  }