コード例 #1
0
    def __init__(self, spec=None, static=False, pause=0.02, autofmt=False):
        Text.__init__(self, spec, static, pause, autofmt)

        # Since we're not actually part of the Dragonfly Action hierarchy and dynamically dispatch to one of two
        # Action implementations, we can't simply subclass and rely on polymorphism to call the correct method.
        # That's because this class is a subclass of the container, not of the Action itself.  So, in order to ensure
        # our overridden method is called on the correct Action, we must add an unbound copy of the method to each
        # of the Actions.
        setattr(self._dragonfly_action, "_parse_spec", self._parse_spec)
コード例 #2
0
    def __init__(self, spec=None, static=False, pause=0.02, autofmt=False):
        Text.__init__(self, spec, static, pause, autofmt)

        # Since we're not actually part of the Dragonfly Action hierarchy and dynamically dispatch to one of two
        # Action implementations, we can't simply subclass and rely on polymorphism to call the correct method.
        # That's because this class is a subclass of the container, not of the Action itself.  So, in order to ensure
        # our overridden method is called on the correct Action, we must add an unbound copy of the method to each
        # of the Actions.
        setattr(self._dragonfly_action, "_parse_spec", self._parse_spec)
コード例 #3
0
 def __init__(self,
              spec=None,
              static=False,
              pause=Text._pause_default,
              autofmt=False):
     Text.__init__(self,
                   spec=spec,
                   static=static,
                   pause=pause,
                   autofmt=autofmt)
コード例 #4
0
ファイル: actions.py プロジェクト: mpourmpoulis/mathfly
 def __init__(self,
              spec=None,
              static=False,
              pause=_pause_default,
              autofmt=False,
              use_hardware=False):
     TextBase.__init__(self,
                       spec=spec,
                       static=static,
                       pause=pause,
                       autofmt=autofmt,
                       use_hardware=use_hardware)
コード例 #5
0
ファイル: format.py プロジェクト: TDress/dragonfly-mappings
 def __init__(self, spec=None, static=False, pause=0.02, autofmt=False):
     Text.__init__(self, spec, static, pause, autofmt)
コード例 #6
0
ファイル: action_words.py プロジェクト: arrowzol/voice_coder
 def __init__(self, separator="", prefix="", first=None, rest=None):
     Text.__init__(self, "%(text)s")
コード例 #7
0
ファイル: format.py プロジェクト: TDress/dragonfly-mappings
 def __init__(self, spec=None, static=False, pause=0.02, autofmt=False):
     Text.__init__(self, spec, static, pause, autofmt)
コード例 #8
0
 def __init__(self, separator="", prefix="", first=None, rest=None):
     Text.__init__(self, "%(text)s")
     self._first = first
     self._rest = rest
     self._separator = separator
     self._prefix = prefix