Exemplo n.º 1
0
 def __init__(self, welcome=None):
     if welcome:
         print welcome
     print 'Synchronizing . . .',
     cli.line_go(u'sync')
     print 'synchronized.'
     self.repl()
Exemplo n.º 2
0
 def repl(self):
     while True:
         try:
             line = raw_input(PROMPT)
         except EOFError:
             print 'quit'
             break
         if line.strip() in ('exit', 'quit'):
             break
         cli.line_go(line)
Exemplo n.º 3
0
def fish_command(line, username=None, raiseErrors=None):
    """
        Executes a fish command without reading the cache.
        If no user is give, default credentials are used;
        if a username is given that user's credentials file is read.
    """
    cred = Credentials(username)
    cache = Cache(None)
    return cli.line_go(line, cred.username, cred.password, cache=cache,
                   raiseErrors=raiseErrors)