Exemple #1
0
        keys = level.childrennames()    
        if prefix: keys = filter ( lambda x: x.startswith(prefix), keys)
    
    if state < len(keys):
        if level != cliRoot and level != currentLevel:
            return level.path(stopat = currentLevel) + "." + keys[state]
        else:
            return keys[state]
    else:
        return None
    
signature = None
sigidx = {}

try:
    client = APP.CLIClient()
    signature = client.recv()
except socket.error:
    print "Connection failed."
    sys.exit(1)

cliRoot = CreateCliTree(signature)
cliRoot.root = True
print signature
print cliRoot.printall()


try:
    if hasReadline:
        readline.read_history_file ( os.path.expanduser("~/.prov-history") )
except IOError: