Пример #1
0
def lock(family): # str
  name = "font.%s.lock" % family
  import initrc
  if initrc.lock(name):
    return True
  else:
    dwarn("multiple instances")
    return False
Пример #2
0
def lock(lang):  # str -> bool
    name = "kanjidic.%s.lock" % lang
    import initrc
    if initrc.lock(name):
        return True
    else:
        dwarn("multiple instances")
        return False
Пример #3
0
def lock(lang):  # str
    name = "lingoes.%s.lock" % lang
    import initrc
    if initrc.lock(name):
        return True
    else:
        dwarn("multiple instances")
        return False
Пример #4
0
def lock(dic): # str
  name = "stardict.%s.lock" % dic
  import initrc
  if initrc.lock(name):
    return True
  else:
    dwarn("multiple instances")
    return False
Пример #5
0
def main():
    """
  @param  argv  [unicode]
  @return  int
  """
    dprint("enter")
    ok = False
    try:
        init()
        ok = get() and extract()
        if ok:
            from sakurakit import skos
            skos.open_location(os.path.abspath(TARGET_DIR))
    except Exception, e:
        dwarn(e)
    ret = 0 if ok else 1
    dprint("leave: ret = %s" % ret)
    return ret


if __name__ == '__main__':
    import sys
    if not initrc.lock('unidic.lock'):
        dwarn("multiple instances")
        sys.exit(1)
    msg()
    ret = main()
    sys.exit(ret)

# EOF
Пример #6
0
# Main process

def main():
  """
  @return  int
  """
  dprint("enter")
  ok = False
  try:
    init()
    ok = get() and makedb()
    if ok:
      from sakurakit import skos
      skos.open_location(os.path.abspath(TARGET_DIR))
  except Exception, e:
    dwarn(e)
  ret = 0 if ok else 1
  dprint("leave: ret = %s" % ret)
  return ret

if __name__ == '__main__':
  import sys
  if not initrc.lock('edict.lock'):
    dwarn("multiple instances")
    sys.exit(1)
  ret = main()
  sys.exit(ret)


# EOF
Пример #7
0
def main():
    """
  @param  argv  [unicode]
  @return  int
  """
    dprint("enter")
    ok = False
    try:
        init()
        ok = get() and extract()
        if ok:
            from sakurakit import skos
            skos.open_location(os.path.abspath(TARGET_DIR))
    except Exception, e:
        dwarn(e)
    ret = 0 if ok else 1
    dprint("leave: ret = %s" % ret)
    return ret


if __name__ == '__main__':
    import sys
    if not initrc.lock('ipadic.lock'):
        dwarn("multiple instances")
        sys.exit(1)
    msg()
    ret = main()
    sys.exit(ret)

# EOF
Пример #8
0
def main(argv):
  """
  @param  argv  [unicode]
  @return  int
  """
  dprint("enter")
  ok = False
  try:
    init()
    ok = get() and run()
    if ok:
      from sakurakit import skos
      skos.open_location(os.path.abspath(INST_DIR))
  except Exception, e:
    dwarn(e)
  ret = 0 if ok else 1
  dprint("leave: ret = %s" % ret)
  return ret

if __name__ == '__main__':
  import sys
  if not initrc.lock('apploc.lock'):
    dwarn("multiple instances")
    sys.exit(1)

  msg()
  ret = main(sys.argv[1:])
  sys.exit(ret)

# EOF
Пример #9
0

def main():
    """
  @return  int
  """
    dprint("enter")
    ok = False
    try:
        init()
        ok = compile()
        if ok:
            from sakurakit import skos
            skos.open_location(os.path.abspath(TARGET_DIR))
    except Exception, e:
        dwarn(e)
    ret = 0 if ok else 1
    dprint("leave: ret = %s" % ret)
    return ret


if __name__ == '__main__':
    import sys
    if not initrc.lock('mecab-edict.lock'):
        dwarn("multiple instances")
        sys.exit(1)
    ret = main()
    sys.exit(ret)

# EOF
Пример #10
0
def main():
    """
  @param  argv  [unicode]
  @return  int
  """
    dprint("enter")
    ok = False
    try:
        init()
        ok = get() and extract()
        if ok:
            from sakurakit import skos
            skos.open_location(os.path.abspath(TARGET_DIR))
    except Exception, e:
        dwarn(e)
    ret = 0 if ok else 1
    dprint("leave: ret = %s" % ret)
    return ret


if __name__ == '__main__':
    import sys
    if not initrc.lock('wadoku.lock'):
        dwarn("multiple instances")
        sys.exit(1)
    msg()
    ret = main()
    sys.exit(ret)

# EOF