def initConfig(self, filename="vb2py.ini", path=None): """Read the values""" if path is None: path = rootPath() self._config = ConfigParser.ConfigParser() self._config.read(os.path.join(path, filename)) self._local_overide = {}
def __init__(self, basesourcefile=None): """Initialize the resource""" if basesourcefile is None: self.basesourcefile = os.path.join( rootPath(), "targets", self.target_name, "basesource") else: self.basesourcefile = basesourcefile # # Apply default resource self._rsc = {} self._code = "" # log.debug("BaseResource init")
import glob import os # Depends who imports us ... don't understand this try: from vb2py.utils import rootPath except ImportError: from utils import rootPath mods = [] for fn in glob.glob(os.path.join(rootPath(), "plugins", "*.py")): name = os.path.splitext(os.path.basename(fn))[0] if not name.startswith("_"): mods.append(name)