def is_valid_extension(string):
		extension = FileDiff.get_extension(string)

		for i in extensions.get():
			if extension == i:
				return True
		return False
Exemple #2
0
	def is_valid_extension(string):
		extension = FileDiff.get_extension(string)

		for i in extensions.get():
			if (extension == "" and i == "*") or extension == i or i == '**':
				return True
		return False
Exemple #3
0
    def loadGroup(self, groupName):
        pluginsUnordered = extensions.get(group=groupName)
        plugins = {}
        for plugin in pluginsUnordered:
            split = plugin.name.split("-")
            plugins[int(split[0])] = plugin

        for key, plugin in sorted(plugins.iteritems()):
            data = plugin.load()
            if issubclass(data, PluginBase):
                pluginObject = data(IlsaPlugin(self._mainWindowWidget))
                pluginObject.name = plugin.name
                if  pluginObject.status:
                    if pluginObject.separator:
                        self.add(None)
                    self.add(pluginObject)
Exemple #4
0
import sys
import glob
import locale
import shutil
import fnmatch
from distutils.core import setup
from setuptools import find_packages
import ConfigParser
import extensions

config = ConfigParser.ConfigParser()
config.read(os.path.abspath(os.path.join(os.getcwd(), "resources", "moonstone.conf")))
config_dir = ".{0}".format(config.get("moonstone", "name_unix"))

extensions.register_file(os.path.abspath(os.path.join(os.getcwd(), "moonstone/ilsa/resources/plugin.conf")))
registered_plugins = [plugin.module_name for plugin in extensions.get()]

if sys.platform == "win32":
    import py2exe

    # If run without args, build executables, in quiet mode.
    if len(sys.argv) == 1:
        sys.argv.append("py2exe")
        sys.argv.append("-q")
    Executable = lambda x, *y, **z: x
    setup_requires = ["py2exe"]
elif sys.platform == "linux2":
    import cx_Freeze
    from cx_Freeze import setup, Executable

    setup_requires = ["cx_Freeze"]