예제 #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
파일: getedict.py 프로젝트: ypypjay/vnr
# 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