コード例 #1
0
ファイル: config.py プロジェクト: ByReaL/vb2py
 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 = {}
コード例 #2
0
ファイル: resources.py プロジェクト: ByReaL/vb2py
 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")
コード例 #3
0
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)