Exemplo n.º 1
0
    def __init__(self, plugin, frame):
        GObject.__init__(self)
        PropertyObject.__init__(self)
        log.debug('Initializing FreezeFrame ' + frame)
        
        self.plugin = plugin 
        self._frame = frame
		
        self._pref_cbs = []
        self._app_cbs = []
        self._notebook_cbs = []
        self._queue_cbs = []
        self._obd_cbs = []
        
        if plugin.app.prefs.get('imperial', False):
            self._unit_standard = 'Imperial'
        else:
            self._unit_standard = 'Metric'
            
        cb_id = plugin.app.prefs.add_watch('imperial', 
                                    self._notify_units_cb)
        self._pref_cbs.append(('imperial', cb_id))
        
        self._setup_gui()
        self._setup_sensors()
        self._get_supported_pids()
Exemplo n.º 2
0
 def __init__ (self, secs, gain, bsecs=-1, minutes=-1):
     GObject.__init__(self)
     
     if bsecs < 0: bsecs = secs
     if minutes < 0:
         minutes = secs / 60
     self.minutes = minutes  # The number of minutes for the original starting
         # time control (not necessarily where the game was resumed,
         # i.e. self.intervals[0][0])
     self.intervals = [[secs],[bsecs]]
     self.gain = gain
     
     self.paused = False
     # The left number of secconds at the time pause was turned on
     self.pauseInterval = 0
     self.counter = None
     
     self.started = False
     self.ended = False
     
     self.movingColor = WHITE
     
     self.connect('time_changed', self.__zerolistener, 'time_changed')
     self.connect('player_changed', self.__zerolistener, 'player_changed')
     self.connect('pause_changed', self.__zerolistener, 'pause_changed')
     self.heap = []
Exemplo n.º 3
0
    def __init__(self, func):
        """ Initialize a new GtkWorker around a specific function """
        GObject.__init__(self)
        Thread.__init__(self)

        # By some reason we cannot access __gsignals__, so we have to do a
        # little double work here
        self.connections = {"progressed": 0, "published": 0, "done": 0}
        self.handler_ids = {}

        self.func = func
        self.cancelled = False
        self.done = False
        self.progress = 0

        ########################################################################
        # Publish and progress queues                                          #
        ########################################################################

        self.publisher = EmitPublisher(self, "published", Publisher.SEND_LIST)
        self.publisher.start()

        self.progressor = EmitPublisher(self, "progressed",
                                        Publisher.SEND_LAST)
        self.progressor.start()
Exemplo n.º 4
0
 def __init__(self, editor):
     GObject.__init__(self)
     self.__init_attributes(editor)
     from GUI.Manager import Manager
     Manager(self, editor)
     from Loader import Loader
     Loader(self, editor)
Exemplo n.º 5
0
 def __init__(self, editor):
     GObject.__init__(self)
     self.__init_attributes(editor)
     from FileInfo import FileInfo
     FileInfo(self, editor)
     from Window import Window
     Window(self, editor)
     from NameLabel import Label
     Label(self, editor)
     from TypeLabel import Label
     Label(self, editor)
     from SizeLabel import Label
     Label(self, editor)
     from LocationLabel import Label
     Label(self, editor)
     from MIMELabel import Label
     Label(self, editor)
     from LinesLabel import Label
     Label(self, editor)
     from WordsLabel import Label
     Label(self, editor)
     from CharactersLabel import Label
     Label(self, editor)
     from ModifiedLabel import Label
     Label(self, editor)
     from AccessedLabel import Label
     Label(self, editor)
Exemplo n.º 6
0
	def __init__(self, editor):
		GObject.__init__(self)
		self.__init_attributes(editor)
		from GUI.Manager import Manager
		Manager(self, editor)
		from Loader import Loader
		Loader(self, editor)
Exemplo n.º 7
0
	def __init__(self, editor):
		GObject.__init__(self)
		self.__init_attributes(editor)
		from SmartSpace import SmartSpace
		SmartSpace(editor, self)
		from ConfigurationManager import Manager
		Manager(editor, self)
Exemplo n.º 8
0
 def __init__(self, obd_device):
     """ @param obd_device: the OBDDevice to send commands
         @param timeout: the time between two commands
     """
     GObject.__init__(self)
     PropertyObject.__init__(self, obd_device=obd_device)
     self._queue = []
     self._os_queue = []
Exemplo n.º 9
0
	def __init__(self, editor):
		GObject.__init__(self)
		from Generator import Generator
		Generator(self, editor)
		from ..SupportedEncodings.EncodingListDispatcher import Dispatcher
		Dispatcher(self, editor)
		from ..SupportedEncodings.EncodingListDatabaseMonitor import Monitor
		Monitor(self, editor)
Exemplo n.º 10
0
 def __init__(self, obd_device):
     """ @param obd_device: the OBDDevice to send commands
         @param timeout: the time between two commands
     """
     GObject.__init__(self)
     PropertyObject.__init__(self, obd_device=obd_device)
     self._queue = []
     self._os_queue = []
Exemplo n.º 11
0
	def __init__(self, manager, editor):
		GObject.__init__(self)
		self.__init_attributes(manager, editor)
		self.__signal_id_1 = self.__manager.connect("abbreviations-updated", self.__manager_abbreviations_updated_cb)
		self.__signal_id_2 = self.__manager.connect("destroy", self.__monitor_destroy_cb)
		self.__signal_id_3 = self.__editor.textview.connect("key-press-event", self.__monitor_key_press_event_cb)
		if self.__can_monitor is False:
			self.__editor.textview.handle_block(self.__signal_id_3)
Exemplo n.º 12
0
	def __init__(self, editor):
		GObject.__init__(self)
		self.__init_attributes(editor)
		from Window import Window
		Window(editor, self)
		from TreeView import TreeView
		TreeView(editor, self)
		from Updater import Updater
		Updater(self, editor)
Exemplo n.º 13
0
	def __init__(self, editor):
		GObject.__init__(self)
		self.__init_attributes(editor)
		from WhitespaceDrawer import Drawer
		Drawer(editor, self)
		from DatabaseReader import Reader
		Reader(self, editor)
		from DatabaseMonitor import Monitor
		Monitor(self, editor)
Exemplo n.º 14
0
 def __init__(self, editor):
     GObject.__init__(self)
     self.__init_attributes(editor)
     from Updater import Updater
     Updater(editor, self)
     from TreeView import TreeView
     TreeView(editor, self)
     from Window import Window
     Window(editor, self)
Exemplo n.º 15
0
    def __init__(self, device):
        """ @param device: the OBDDevice to send commands
            @param timeout: the time between two commands
        """
        GObject.__init__(self)
        PropertyObject.__init__(self, device=device)
        self._queue = []

        self._working = False
Exemplo n.º 16
0
 def on_resource_load_finished(self, func, *args ):
     from gobject import GObject
     def WebView_C_Callable( _webview, _webframe, _webresource, data):
         from .webkit3__WebKitWebFrame import WebKitWebFrame
         from .webkit3__WebKitWebResource import WebKitWebResource
         func( self, self.get_main_frame(), WebKitWebResource(None, obj=_webresource), *args)#WebKitWebFrame(None,obj=_webframe), WebKitWebResource(None,obj=_webresource), *args)
         return None
     CFUNC = CFUNCTYPE(None, POINTER(c_int), POINTER(c_int), POINTER(c_int), POINTER(c_int))
     GObject.connect( self, 'resource-load-finished', func, *args, cfunc = (CFUNC(WebView_C_Callable),CFUNC))
Exemplo n.º 17
0
 def __init__(self, editor):
     GObject.__init__(self)
     self.__init_attributes(editor)
     from WhitespaceDrawer import Drawer
     Drawer(editor, self)
     from DatabaseReader import Reader
     Reader(self, editor)
     from DatabaseMonitor import Monitor
     Monitor(self, editor)
Exemplo n.º 18
0
 def __init__(self, manager, editor):
     GObject.__init__(self)
     self.__init_attributes(manager, editor)
     self.__sigid1 = manager.connect("destroy", self.__destroy_cb)
     from DatabaseUpdater import Updater
     Updater(self, editor)
     from CheckButton import Button
     Button(self, editor)
     from DatabaseListener import Listener
     Listener(self, editor)
Exemplo n.º 19
0
 def __init__(self):
     GObject.__init__(self)
     from IndexerProcessMonitor import Monitor
     Monitor(self)
     from DBusService import DBusService
     DBusService(self)
     from DictionaryGenerator import Generator
     Generator(self)
     from JobSpooler import Spooler
     Spooler(self)
Exemplo n.º 20
0
	def __init__(self):
		GObject.__init__(self)
		from IndexerProcessMonitor import Monitor
		Monitor(self)
		from DBusService import DBusService
		DBusService(self)
		from DictionaryGenerator import Generator
		Generator(self)
		from JobSpooler import Spooler
		Spooler(self)
Exemplo n.º 21
0
    def __init__(self):
        GObject.__init__(self)

        self.tags = []
        self.selected_tags = []
        self.search = None

        for i in range(TAGS_LAST):
            self.tags.append({})
            self.selected_tags.append([])
Exemplo n.º 22
0
 def _attempt_connection(self, _backoff):
     self._disconnect_viewer()
     self._session = SpiceClientGtk.Session()
     self._session.set_property('password', self._password)
     self._session.set_property('enable-usbredir', False)
     # Ensure clipboard sharing is disabled
     self._gtk_session = SpiceClientGtk.spice_gtk_session_get(self._session)
     self._gtk_session.set_property('auto-clipboard', False)
     GObject.connect(self._session, 'channel-new', self._new_channel)
     self._session.open_fd(-1)
Exemplo n.º 23
0
 def __init__(self, queue):
     GObject.__init__(self)
     PropertyObject.__init__(self)
     
     self._rate = 0
     self._samples = []
     self.set_text(_('command rate: N/A'))
     
     queue.connect('command_executed', self._queue_command_executed_cb)
     queue.connect('notify::working', self._queue_notify_working_cb)
Exemplo n.º 24
0
	def __init__(self, manager, editor):
		GObject.__init__(self)
		self.__init_attributes(manager, editor)
		self.__sigid1 = manager.connect("destroy", self.__destroy_cb)
		from DatabaseUpdater import Updater
		Updater(self, editor)
		from CheckButton import Button
		Button(self, editor)
		from DatabaseListener import Listener
		Listener(self, editor)
Exemplo n.º 25
0
 def __init__(self, scheduler):
     GObject.__init__(self)
     PropertyObject.__init__(self)
     
     self._rate = 0
     self._samples = []
     self.set_text(_('refresh rate: N/A'))
     
     scheduler.connect('command_executed', self._scheduler_command_executed_cb)
     scheduler.connect('notify::working', self._scheduler_notify_working_cb)
Exemplo n.º 26
0
    def __init__(self, scheduler):
        GObject.__init__(self)
        PropertyObject.__init__(self)

        self._rate = 0
        self._samples = []
        self.set_text(_('refresh rate: N/A'))

        scheduler.connect('command_executed',
                          self._scheduler_command_executed_cb)
        scheduler.connect('notify::working', self._scheduler_notify_working_cb)
Exemplo n.º 27
0
    def __init__(self, filename):
        GObject.__init__(self)
        self.__accounts = []
        self.next_id = 0
        self.cacheName = filename
        self.__device = NMDevice()

        self.__session = SessionCamel(self)
        self.__session.set_initialized()

        self.__load_cache()
Exemplo n.º 28
0
    def __init__(self, glade):
        GObject.__init__(self)
        PropertyObject.__init__(self)

        self._code_label = glade.get_widget('code_label')
        self._class_label = glade.get_widget('class_label')
        self._description_label = glade.get_widget('description_label')
        self._additional_textview = glade.get_widget('additional_textview')
    
        self._additional_buffer = gtk.TextBuffer()
        self._additional_textview.set_buffer(self._additional_buffer)
Exemplo n.º 29
0
 def __init__(self, editor):
     GObject.__init__(self)
     self.__init_attributes(editor)
     from GUI.Manager import Manager
     Manager(self, editor)
     from EncodingListDispatcher import Dispatcher
     Dispatcher(self, editor)
     from EncodingListDatabaseMonitor import Monitor
     Monitor(self, editor)
     from EncodingListDatabaseUpdater import Updater
     Updater(self, editor)
Exemplo n.º 30
0
    def __init__(self, app):
        GObject.__init__(self)

        self.app = app
        self._config = ConfigParser()
        self._filename = os.path.join(save_config_path("garmon"), "config")
        self._config.read(self._filename)
        
        self._dialog = _PrefsDialog()
        
        self._watches = []
Exemplo n.º 31
0
    def __init__(self, builder):
        GObject.__init__(self)
        PropertyObject.__init__(self)

        self._code_label = builder.get_object('code_label')
        self._class_label = builder.get_object('class_label')
        self._description_label = builder.get_object('description_label')
        self._additional_textview = builder.get_object('additional_textview')
    
        self._additional_buffer = gtk.TextBuffer()
        self._additional_textview.set_buffer(self._additional_buffer)
Exemplo n.º 32
0
	def __init__(self, editor):
		GObject.__init__(self)
		self.__init_attributes(editor)
		from GUI.Manager import Manager
		Manager(self, editor)
		from EncodingListDispatcher import Dispatcher
		Dispatcher(self, editor)
		from EncodingListDatabaseMonitor import Monitor
		Monitor(self, editor)
		from EncodingListDatabaseUpdater import Updater
		Updater(self, editor)
Exemplo n.º 33
0
 def __init__ (self):
     GObject.__init__(self)
     
     self.engines = []
     
     self.jsonpath = addUserConfigPrefix("engines.json")
     try:
         self._engines = json.load(open(self.jsonpath))
     except ValueError, e:
         log.warn("engineNest: Couldn\'t read engines.json, renamed it to .bak\n%s\n" % (self.jsonpath,e))
         os.rename(self.jsonpath, self.jsonpath+".bak")
         self._engines = deepcopy(backup)
Exemplo n.º 34
0
    def __init__(self, glade):
        GObject.__init__(self)
        PropertyObject.__init__(self)

        self._code_label = glade.get_widget('code_label')
        self._class_label = glade.get_widget('class_label')
        self._description_label = glade.get_widget('description_label')
        self._additional_textview = glade.get_widget('additional_textview')

        self._additional_buffer = gtk.TextBuffer()
        self._additional_textview.set_buffer(self._additional_buffer)
        self._dtc_entry = glade.get_widget('dtc_entry')
Exemplo n.º 35
0
	def __init__(self, editor):
		GObject.__init__(self)
		from CursorPositioner import Positioner
		Positioner(self, editor)
		from TextInserter import Inserter
		Inserter(self, editor)
		from SpaceProcessor import Processor
		Processor(self, editor)
		from TextExtractor import Extractor
		Extractor(self, editor)
		from OffsetGetter import Getter
		Getter(self, editor)
Exemplo n.º 36
0
 def __init__(self, editor):
     GObject.__init__(self)
     from CursorPositioner import Positioner
     Positioner(self, editor)
     from TextInserter import Inserter
     Inserter(self, editor)
     from SpaceProcessor import Processor
     Processor(self, editor)
     from TextExtractor import Extractor
     Extractor(self, editor)
     from OffsetGetter import Getter
     Getter(self, editor)
Exemplo n.º 37
0
	def __init__(self, editor):
		GObject.__init__(self)
		from Selector import Selector
		Selector(self, editor)
		from TextInserter import Inserter
		Inserter(self, editor)
		from CaseProcessor import Processor
		Processor(self, editor)
		from TextExtractor import Extractor
		Extractor(self, editor)
		from Marker import Marker
		Marker(self, editor)
Exemplo n.º 38
0
    def __init__(self, app):
        GObject.__init__(self)

        self.app = app
        
        self._config = ConfigParser()
        self._filename = os.path.join(save_config_path("garmon"), "config")
        self._config.read(self._filename)
        
        self._dialog = _PrefsDialog()
        
        self._watches = []
Exemplo n.º 39
0
    def __init__(self, host, ports, username, password):
        GObject.__init__(self)

        self.host = host
        self.ports = ports
        self.username = username
        self.password = password

        self.connected = False
        self.connecting = False

        self.predictions = set()
        self.predictionsDict = {}
Exemplo n.º 40
0
	def __init__(self, editor):
		GObject.__init__(self)
		self.__init_attributes(editor)
		from WidgetTransparencyCheckButton import Button
		Button(self, editor)
		from ForkScribesCheckButton import Button
		Button(self, editor)
		from BracketSelectionColorButton import ColorButton
		ColorButton(editor, self)
		from Window import Window
		Window(editor, self)
		from TemplateIndentation.Manager import Manager
		Manager(self, editor)
 def __init__ (self, host, ports, username, password):
     GObject.__init__(self)
     
     self.host = host
     self.ports = ports
     self.username = username
     self.password = password
     
     self.connected = False
     self.connecting = False
     
     self.predictions = set()
     self.predictionsDict = {}
Exemplo n.º 42
0
 def __init__ (self, secs, gain):
     GObject.__init__(self)
     
     self.intervals = [[secs],[secs]]
     self.gain = gain
     
     self.paused = False
     # The left number of secconds at the time pause was turned on
     self.pauseInterval = 0
     self.counter = None
     
     self.started = False
     
     self.movingColor = WHITE
Exemplo n.º 43
0
	def __init__(self, editor):
		GObject.__init__(self)
		self.__init_attributes(editor)
		from GUI.Manager import Manager
		Manager(self, editor)
		from TextInserter import Inserter
		Inserter(self, editor)
		from TextColorer import Colorer
		Colorer(self, editor)
		from BufferMonitor import Monitor
		Monitor(self, editor)
		from DictionaryManager import Manager
		Manager(self, editor)
		from DatabaseMonitor import Monitor
		Monitor(self, editor)
Exemplo n.º 44
0
 def __init__(self, editor):
     GObject.__init__(self)
     self.__init_attributes(editor)
     from GUI.Manager import Manager
     Manager(self, editor)
     from TextInserter import Inserter
     Inserter(self, editor)
     from TextColorer import Colorer
     Colorer(self, editor)
     from BufferMonitor import Monitor
     Monitor(self, editor)
     from DictionaryManager import Manager
     Manager(self, editor)
     from DatabaseMonitor import Monitor
     Monitor(self, editor)
Exemplo n.º 45
0
 def __init__(self, editor):
     GObject.__init__(self)
     self.__init_attributes(editor)
     from BusyManager import Manager
     Manager(self, editor)
     from MessageLabel import Label
     Label(self, editor)
     from TitleLabel import Label
     Label(self, editor)
     from Image import Image
     Image(self, editor)
     from WindowTitleUpdater import Updater
     Updater(self, editor)
     from Window import Window
     Window(self, editor)
Exemplo n.º 46
0
	def __init__(self, editor):
		GObject.__init__(self)
		self.__init_attributes(editor)
		from BusyManager import Manager
		Manager(self, editor)
		from MessageLabel import Label
		Label(self, editor)
		from TitleLabel import Label
		Label(self, editor)
		from Image import Image
		Image(self, editor)
		from WindowTitleUpdater import Updater
		Updater(self, editor)
		from Window import Window
		Window(self, editor)
Exemplo n.º 47
0
 def _connect_viewer(self, password):
     self._disconnect_viewer()
     self._session = SpiceClientGtk.Session()
     self._session.set_property('password', password)
     self._session.set_property('enable-usbredir', False)
     # Ensure clipboard sharing is disabled
     self._gtk_session = SpiceClientGtk.spice_gtk_session_get(self._session)
     self._gtk_session.set_property('auto-clipboard', False)
     try:
         # Enable audio
         self._audio = SpiceClientGtk.Audio(self._session)
     except RuntimeError:
         # No local PulseAudio, etc.
         pass
     GObject.connect(self._session, 'channel-new', self._new_channel)
     self._session.open_fd(-1)
Exemplo n.º 48
0
	def __init__(self, editor):
		GObject.__init__(self)
		self.__init_attributes(editor)
		from Import.Manager import Manager
		Manager(self, editor)
		from Export.Manager import Manager
		Manager(self, editor)
		from EditorGUI.Manager import Manager
		Manager(self, editor)
		from MainGUI.Manager import Manager
		Manager(self, editor)
		from DatabaseUpdater import Updater
		Updater(self, editor)
		# This Monitor object should be initialized last.
		from DatabaseMonitor import Monitor
		Monitor(self, editor)
Exemplo n.º 49
0
 def __init__ (self):
     GObject.__init__(self)
     
     self.backup = ET.ElementTree(fromstring(backup))
     self.xmlpath = addUserConfigPrefix("engines.xml")
     try:
         self.dom = ET.ElementTree(file=self.xmlpath)
         c = compareVersions(self.dom.getroot().get('version', default='0'), ENGINES_XML_API_VERSION)
         if c == -1:
             log.warn("engineNest: engines.xml is outdated. It will be replaced\n")
             self.dom = deepcopy(self.backup)
         elif c == 1:
             raise NotImplementedError, "engines.xml is of a newer date. In order" + \
                             "to run this version of PyChess it must first be removed"
     except ParseError, e:
         log.warn("engineNest: %s\n" % e)
         self.dom = deepcopy(self.backup)
Exemplo n.º 50
0
    def __init__(self, app):

        GObject.__init__(self)

        self._app = app
        self._glade = app.glade
        self._connection = app.connection

        self._window = self._glade.get_widget('main-window')

        self._images = self._glade.get_widget_prefix('imageD')
        self._labels = self._glade.get_widget_prefix('labelD')
        self._compressors = self._glade.get_widget_prefix('statusKOM')
        for image in self._compressors:
            image.set_from_stock('com-uit', gtk.ICON_SIZE_DIALOG)

        self._connection.connect('data-arrived', self._data_arrived_cb)
Exemplo n.º 51
0
    def __init__(self, host):
        GObject.__init__(self)
        self.host = host
        self.subproc = None

        self.expression = re.compile("time=([\d\.]+) (m?s)")

        # We need untranslated error messages in regexp search
        # below, so have to use deferred translation here
        def _(msg):
            return msg

        error = _("Destination Host Unreachable")
        self.errorExprs = (re.compile("(%s)" % error), )
        del _

        self.restartsOnDead = 3
        self.deadCount = 0
Exemplo n.º 52
0
Arquivo: ping.py Projeto: btrent/knave
    def __init__ (self, host):
        GObject.__init__(self)
        self.host = host
        self.subproc = None
        
        self.expression = re.compile("time=([\d\.]+) (m?s)")

        # We need untranslated error messages in regexp search
        # below, so have to use deferred translation here
        def _(msg): return msg
        error = _("Destination Host Unreachable")
        self.errorExprs = (
            re.compile("(%s)" % error),
        )
        del _

        self.restartsOnDead = 3
        self.deadCount = 0
Exemplo n.º 53
0
    def __init__(self, connection):
        GObject.__init__(self)

        self.connection = connection

        self.connection.expect_line(
            self.onOfferAdd, "<p(t|f)> (\d+) w=%s t=(\w+) p=(.+)" % names)
        self.connection.expect_line(self.onOfferRemove, "<pr> (\d+)")

        for ficsstring, offer, error in (
            ("You cannot switch sides once a game is underway.",
             Offer(SWITCH_OFFER), ACTION_ERROR_SWITCH_UNDERWAY),
            ("Opponent is not out of time.", Offer(FLAG_CALL),
             ACTION_ERROR_NOT_OUT_OF_TIME), ("The clock is not ticking yet.",
                                             Offer(PAUSE_OFFER),
                                             ACTION_ERROR_CLOCK_NOT_STARTED),
            ("The clock is not ticking.", Offer(FLAG_CALL),
             ACTION_ERROR_CLOCK_NOT_STARTED), ("The clock is not paused.",
                                               Offer(RESUME_OFFER),
                                               ACTION_ERROR_CLOCK_NOT_PAUSED)):
            self.connection.expect_line(
                lambda match: self.emit("onActionError", offer, error),
                ficsstring)

        self.connection.expect_line(
            self.notEnoughMovesToUndo,
            "There are (?:(no)|only (\d+) half) moves in your game\.")

        self.connection.expect_line(
            self.noOffersToAccept, "There are no ([^ ]+) offers to (accept).")

        self.connection.expect_line(
            self.onOfferDeclined,
            "\w+ declines the (draw|takeback|pause|unpause|abort|adjourn) request\."
        )

        self.lastPly = 0
        self.offers = {}

        self.connection.lvm.setVariable(
            "formula", "!suicide & !crazyhouse & !bughouse & !atomic")
        self.connection.lvm.setVariable("pendinfo", True)
Exemplo n.º 54
0
	def __init__(self, editor):
		GObject.__init__(self)
		from HideTimer import Timer
		Timer(self, editor)
		from APIVisibilityUpdater import Updater
		Updater(self, editor)
		from VisibilityUpdater import Updater
		Updater(self, editor)
		from Resizer import Resizer
		Resizer(self, editor)
		from Animator import Animator
		Animator(self, editor)
		from Displayer import Displayer
		Displayer(self, editor)
		from MouseSensor import Sensor
		Sensor(self, editor)
		from DeltaCalculator import Calculator
		Calculator(self, editor)
		from SizeUpdater import Updater
		Updater(self, editor)
Exemplo n.º 55
0
    def __init__(self):
        GObject.__init__(self)

        self.backup = ET.ElementTree(fromstring(backup))
        self.xmlpath = addUserConfigPrefix("engines.xml")
        try:
            self.dom = ET.ElementTree(file=self.xmlpath)
            c = compareVersions(self.dom.getroot().get('version', default='0'),
                                ENGINES_XML_API_VERSION)
            if c == -1:
                log.warn(
                    "engineNest: engines.xml is outdated. It will be replaced\n"
                )
                self.dom = deepcopy(self.backup)
            elif c == 1:
                raise NotImplementedError, "engines.xml is of a newer date. In order" + \
                                "to run this version of PyChess it must first be removed"
        except ParseError, e:
            log.warn("engineNest: %s\n" % e)
            self.dom = deepcopy(self.backup)