Esempio n. 1
0
def main():
    pwd = os.getcwd()
    s = raw_input("chdir [%s] " % pwd)
    if s:
        os.chdir(s)
        pwd = os.getcwd()
    host = ask("host", 'voorn.cwi.nl')
    port = 4127
    verbose = 1
    mode = ''
    print """\
Mode should be a string of characters, indicating what to do with differences.
r - read different files to local file system
w - write different files to remote file system
c - create new files, either remote or local
d - delete disappearing files, either remote or local
"""
    s = raw_input("mode [%s] " % mode)
    if s: mode = s
    address = (host, port)
    t1 = time.time()
    local = FSProxy.FSProxyLocal()
    remote = FSProxy.FSProxyClient(address, verbose)
    compare(local, remote, mode)
    remote._close()
    local._close()
    t2 = time.time()
    dt = t2 - t1
    mins, secs = divmod(dt, 60)
    print mins, "minutes and", round(secs), "seconds"
    raw_input("[Return to exit] ")
Esempio n. 2
0
def main():
    t1 = time.time()
    #proxy = FSProxy.FSProxyClient(('voorn.cwi.nl', 4127))
    proxy = FSProxy.FSProxyLocal()
    sumtree(proxy)
    proxy._close()
    t2 = time.time()
    print t2 - t1, "seconds"
    raw_input("[Return to exit] ")
Esempio n. 3
0
def main():
    t1 = time.time()
    #proxy = FSProxy.FSProxyClient(('voorn.cwi.nl', 4127))
    proxy = FSProxy.FSProxyLocal()
    sumtree(proxy)
    proxy._close()
    t2 = time.time()
    print(t2-t1, "seconds")
    sys.stdout.write("[Return to exit] ")
    sys.stdout.flush()
    sys.stdin.readline()
Esempio n. 4
0
import time
Esempio n. 5
0
"""Compare local and remote dictionaries and transfer differing files -- like rdist."""