()
test code
test code
test code
def main():
    """test code"""

    try:
        L = Lockfile('./test.pid')
    except LockfileLockedException, e:
        sys.stderr.write("%s\n" % e)
        sys.exit(-1)
    else:
        print "lock acquired "
        print "...sleeping for 10 seconds"
        import time
        time.sleep(10)
        L.release()
        print "lock released "
def main ( ) : try : L = Lockfile ( './test.pid' ) except LockfileLockedException , e : sys . stderr . write ( "%s\n" % e ) sys . exit ( - 1 ) else : print "lock acquired " print "...sleeping for 10 seconds" import time time . sleep ( 10 ) L . release ( ) print "lock released "