def lock(family): # str name = "font.%s.lock" % family import initrc if initrc.lock(name): return True else: dwarn("multiple instances") return False
def lock(lang): # str -> bool name = "kanjidic.%s.lock" % lang import initrc if initrc.lock(name): return True else: dwarn("multiple instances") return False
def lock(lang): # str name = "lingoes.%s.lock" % lang import initrc if initrc.lock(name): return True else: dwarn("multiple instances") return False
def lock(dic): # str name = "stardict.%s.lock" % dic import initrc if initrc.lock(name): return True else: dwarn("multiple instances") return False
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
# 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
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
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
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
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