Beispiel #1
0
    def setup(self):
        """Setup the loader and load the Mamba plugins
        """

        try:
            files = filepath.listdir(self._module_store)
            pattern = re.compile(r'[^_?]\.py$', re.IGNORECASE)
            for py_file in filter(pattern.search, files):
                if self.is_valid_file(py_file):
                    self.load(py_file)
        except OSError:
            pass
Beispiel #2
0
    def setup(self):
        """Setup the loader and load the Mamba plugins
        """

        try:
            files = filepath.listdir(self._module_store)
            pattern = re.compile(r'[^_?]\.py$', re.IGNORECASE)
            for py_file in filter(pattern.search, files):
                if self.is_valid_file(py_file):
                    self.load(py_file)
        except OSError:
            pass
    def setup(self):
        """
        Setup the loader and load the stylesheets
        """

        try:
            files = filepath.listdir(self._styles_store)
            pattern = re.compile("[^_?]\%s$" % ".css|.less", re.IGNORECASE)
            for stylefile in filter(pattern.search, files):
                stylefile = normpath("{}/{}".format(self._styles_store, stylefile))
                self.load(stylefile)
        except OSError:
            pass
Beispiel #4
0
    def setup(self):
        """
        Setup the loader and load the scripts
        """

        try:
            files = filepath.listdir(self._scripts_store)
            pattern = re.compile('[^_?]\%s$' % '.js|.dart', re.IGNORECASE)
            for stylefile in filter(pattern.search, files):
                stylefile = normpath('{}/{}'.format(self._scripts_store,
                                                    stylefile))
                self.load(stylefile)
        except OSError:
            pass
Beispiel #5
0
    def setup(self):
        """
        Setup the loader and load the scripts
        """

        try:
            files = filepath.listdir(self._scripts_store)
            pattern = re.compile('[^_?]\%s$' % '.js|.dart', re.IGNORECASE)
            for stylefile in filter(pattern.search, files):
                stylefile = normpath(
                    '{}/{}'.format(self._scripts_store, stylefile)
                )
                self.load(stylefile)
        except OSError:
            pass
Beispiel #6
0
    def _load_from_package(self, package=''):
        """Load modules from the given package
        """

        try:
            for f in filepath.listdir(package):
                filename = filepath.joinpath(package, f)
                fp = filepath.FilePath(filename)
                if fp.isdir():
                    self._load_from_package(filename)
                    continue
                if self.pattern.search(filename) is not None:
                    if self.is_valid_file(filename):
                        self.load(filename)
        except OSError:
            pass
Beispiel #7
0
    def _load_from_package(self, package=''):
        """Load modules from the given package
        """

        try:
            for f in filepath.listdir(package):
                filename = filepath.joinpath(package, f)
                fp = filepath.FilePath(filename)
                if fp.isdir():
                    self._load_from_package(filename)
                    continue
                if self.pattern.search(filename) is not None:
                    if self.is_valid_file(filename):
                        self.load(filename)
        except OSError:
            pass