Open a new ModFile
@since 22.06.2006
189385
private void doOpenFile()
	{
		FileChooserResult selectedFile = Helpers.selectFileNameFor(this, searchPath, "Load a Sound-File", fileFilterLoad, 0, true, false);
		if (selectedFile!=null) 
			doOpenFile(selectedFile.getSelectedFiles());
	}
960203
def _add_modification_to_agent(agent, mod_type, residue, position):
    """"""
    new_mod = ModCondition(mod_type, residue, position)
    # Check if this modification already exists
    for old_mod in agent.mods:
        if old_mod.equals(new_mod):
            return agent
    new_agent = deepcopy(agent)
    new_agent.mods.append(new_mod)
    return new_agent
1106556
def _muaprocessnew(self):
        """"""
        foldername = self._foldername("new")
        files = self.filesystem.listdir(foldername)
        for filename in files:
            if filename == "":
                continue
            curfilename = self._foldername(joinpath("new", filename))
            newfilename = joinpath(
                self._cur,
                "%s:2,%s" % (filename, "")
                )
            self.filesystem.rename(curfilename, newfilename)
774493
private File zipModule(ModuleIdentifier modID) {
    File modDir = new File(modRoot, modID.toString());
    if (!modDir.exists()) {
      throw new PlatformManagerException("Cannot find module");
    }

    // Create a temporary directory in which to store the module and its dependencies.
    File modRoot = new File(TEMP_DIR, "vertx-zip-mods");

    // Create a zip file. If the zip file already exists in the temporary
    // Vertigo zips directory then just return the existing zip file.
    File zipFile = new File(modRoot, modID.toString() + ".zip");
    if (zipFile.exists()) {
      return zipFile;
    }

    // Create a temporary directory to which we'll copy the module and its dependencies.
    File modDest = new File(modRoot, modID.toString() + "-" + UUID.randomUUID().toString());
    File modHome = new File(modDest, modID.toString());

    // Create the temporary destination directory.
    vertx.fileSystem().mkdirSync(modHome.getAbsolutePath(), true);

    // Copy the module into the temporary directory.
    vertx.fileSystem().copySync(modDir.getAbsolutePath(), modHome.getAbsolutePath(), true);

    // Pull any module dependencies ("includes" and "deploys") into the temporary directory.
    pullInDependencies(modID, modHome);

    // Zip up the temporary directory into the zip file.
    zipDirectory(zipFile.getPath(), modDest.getAbsolutePath());

    // Delete the temporary directory.
    vertx.fileSystem().deleteSync(modDest.getAbsolutePath(), true);
    return zipFile;
  }
1352236
function mod(a, b) {
    return function(e, k) {
      var action = !(e.shiftKey || e.ctrlKey || e.altKey || e.metaKey) ? a : b;
      return resolve(action, e, k);
    };
  }
128153
function require_reset() {
    ModuleStore        = {}
    ModulePreloadStore = {}
    MainModule         = create_module(null)

    var require = get_require(MainModule)
    var define  = require_define
    
    define("modjewel", modjewel_module)

    global.modjewel            = require("modjewel")
    global.modjewel.require    = require
    global.modjewel.define     = define
    global.modjewel.define.amd = {implementation: PROGRAM, version: VERSION}
}
373526
def _set_persistent_module(mod):
    '''
    
    '''
    conf = _get_modules_conf()
    if not os.path.exists(conf):
        __salt__['file.touch'](conf)
    mod_name = _strip_module_name(mod)
    if not mod_name or mod_name in mod_list(True) or mod_name \
            not in available():
        return set()
    escape_mod = re.escape(mod)
    # If module is commented only uncomment it
    if __salt__['file.search'](conf,
                               '^#[\t ]*{0}[\t ]*$'.format(escape_mod),
                               multiline=True):
        __salt__['file.uncomment'](conf, escape_mod)
    else:
        __salt__['file.append'](conf, mod)
    return set([mod_name])
962604
function loadJsFile(file) {
    var modId = path.basename(file).slice(0, -3);
    var mod = require(file);
    modulePath[modId] = file;
    mod.__id = modId;
    return mod;
}
572967
def loadModule(self, modName, **userCtx):
        """"""
        for mibSource in self._mibSources:
            debug.logger & debug.FLAG_BLD and debug.logger(
                'loadModule: trying %s at %s' % (modName, mibSource))

            try:
                codeObj, sfx = mibSource.read(modName)

            except IOError as exc:
                debug.logger & debug.FLAG_BLD and debug.logger(
                    'loadModule: read %s from %s failed: '
                    '%s' % (modName, mibSource, exc))
                continue

            modPath = mibSource.fullPath(modName, sfx)

            if modPath in self._modPathsSeen:
                debug.logger & debug.FLAG_BLD and debug.logger(
                    'loadModule: seen %s' % modPath)
                break

            else:
                self._modPathsSeen.add(modPath)

            debug.logger & debug.FLAG_BLD and debug.logger(
                'loadModule: evaluating %s' % modPath)

            g = {'mibBuilder': self,
                 'userCtx': userCtx}

            try:
                exec(codeObj, g)

            except Exception:
                self._modPathsSeen.remove(modPath)
                raise error.MibLoadError(
                    'MIB module "%s" load error: '
                    '%s' % (modPath, traceback.format_exception(*sys.exc_info())))

            self._modSeen[modName] = modPath

            debug.logger & debug.FLAG_BLD and debug.logger(
                'loadModule: loaded %s' % modPath)

            break

        if modName not in self._modSeen:
            raise error.MibNotFoundError(
                'MIB file "%s" not found in search path '
                '(%s)' % (modName and modName + ".py[co]", ', '.join(
                    [str(x) for x in self._mibSources])))

        return self
697101
def _new_mods(pre_mods, post_mods):
    '''
    
    '''
    pre = set()
    post = set()
    for mod in pre_mods:
        pre.add(mod['module'])
    for mod in post_mods:
        post.add(mod['module'])
    return post - pre
873843
def register(name, mod, options)
      elements[name] = plugin_type.new(mod, options)
    end
870930
public void editNewModule(Runnable callback) {

        CmsModule module = new CmsModule();
        module.setSite("/");

        editModule(module, true, CmsVaadinUtils.getMessageText(Messages.GUI_MODULES_TITLE_NEW_MODULE_0), callback);

    }
992422
public void replaceModuleFromDefault(String importFile) throws Exception {

        CmsModule module = CmsModuleImportExportHandler.readModuleFromImport(importFile);
        String moduleName = module.getName();
        replaceModuleFromDefault(moduleName, importFile);
    }
595971
def _extension(modpath: str) -> setuptools.Extension:
    """"""
    return setuptools.Extension(modpath, [modpath.replace(".", "/") + ".py"])
763618
def update_module(self, modname, underlined=None):
        
        try:
            pymodule = self.project.get_module(modname)
            self._add_names(pymodule, modname, underlined)
        except exceptions.ModuleNotFoundError:
            pass
502044
def _mod_repo_in_file(repo, repostr, filepath):
    '''
    
    '''
    with salt.utils.files.fopen(filepath) as fhandle:
        output = []
        for line in fhandle:
            cols = salt.utils.args.shlex_split(
                salt.utils.stringutils.to_unicode(line).strip()
            )
            if repo not in cols:
                output.append(line)
            else:
                output.append(salt.utils.stringutils.to_str(repostr + '\n'))
    with salt.utils.files.fopen(filepath, 'w') as fhandle:
        fhandle.writelines(output)
729148
def new():
    """"""
    dir_path = os.path.dirname(os.path.realpath(__file__))
    cookiecutter(os.path.join(dir_path, 'historical-cookiecutter/'))