keypressmgr.py
def kbToString(self, kb): # {{{1
    "Convert a kb dict to a string"
    s = "{} ".format(kb["key"])
    if kb["modifiers"]:
      s += "+".join(getKeyName(m) for m in kb["modifiers"]) + "+"
    s += getKeyName(kb["key"])
    s += " on {}".format(getKeyStateString(kb["states"]))
    if kb["timeout"]:
      s += " timeout {}".format(kb["timeout"])
    try:
      fs = str(kb["func"].__name__)
    except AttributeError:
      fs = str(kb["func"])
    s += " to {}".format(fs)
    arginfo = []
    if kb["wantKeyInfo"]:
      arginfo.append("keys")
    if kb["extraArgs"]:
      for arg in kb["extraArgs"]:
        arginfo.append(repr(arg))
    if kb["extraKwargs"]:
      for k, v in kb["extraKwargs"].items():
        arginfo.append("{!r}={!r}".format(k, v))
    s += "({})".format(", ".join(arginfo))
    return s
Convert a kb dict to a string
Convert a kb dict to a string
Convert a kb dict to a string
def kbToString(self, kb): 
    s = "{} ".format(kb["key"])
    if kb["modifiers"]:
      s += "+".join(getKeyName(m) for m in kb["modifiers"]) + "+"
    s += getKeyName(kb["key"])
    s += " on {}".format(getKeyStateString(kb["states"]))
    if kb["timeout"]:
      s += " timeout {}".format(kb["timeout"])
    try:
      fs = str(kb["func"].__name__)
    except AttributeError:
      fs = str(kb["func"])
    s += " to {}".format(fs)
    arginfo = []
    if kb["wantKeyInfo"]:
      arginfo.append("keys")
    if kb["extraArgs"]:
      for arg in kb["extraArgs"]:
        arginfo.append(repr(arg))
    if kb["extraKwargs"]:
      for k, v in kb["extraKwargs"].items():
        arginfo.append("{!r}={!r}".format(k, v))
    s += "({})".format(", ".join(arginfo))
    return s
def kbToString ( self , kb ) : s = "{} " . format ( kb [ "key" ] ) if kb [ "modifiers" ] : s += "+" . join ( getKeyName ( m ) for m in kb [ "modifiers" ] ) + "+" s += getKeyName ( kb [ "key" ] ) s += " on {}" . format ( getKeyStateString ( kb [ "states" ] ) ) if kb [ "timeout" ] : s += " timeout {}" . format ( kb [ "timeout" ] ) try : fs = str ( kb [ "func" ] . __name__ ) except AttributeError : fs = str ( kb [ "func" ] ) s += " to {}" . format ( fs ) arginfo = [ ] if kb [ "wantKeyInfo" ] : arginfo . append ( "keys" ) if kb [ "extraArgs" ] : for arg in kb [ "extraArgs" ] : arginfo . append ( repr ( arg ) ) if kb [ "extraKwargs" ] : for k , v in kb [ "extraKwargs" ] . items ( ) : arginfo . append ( "{!r}={!r}" . format ( k , v ) ) s += "({})" . format ( ", " . join ( arginfo ) ) return s
Convert a kb dict to a string
Convert a kb dict to a string
# {{{1 "Convert a kb dict to a string"
self
kb