Beispiel #1
0
def cui_main(screen, directory, static, begin, end):
    # parse through the command line arguments (check if -d option)

    model = PNAModel()

    if static != None and directory != None:
        sys.exit(2)
    elif directory != None:
        add_data(model, directory, begin, end)
    elif static != None:
        add_data(model, static, begin, end)

    if directory:
        #print 'Directory to watch for updates needs to be specified'
        dirwatch = DirectoryWatcher(model, directory)
        interface = CursesInterface(screen, model, dirwatch)
        interface.interact()
    else:
        for file in args:
            model.add_file(file)
        interface = CursesInterface(screen, model, None)
        interface.interact()
    """
Beispiel #2
0
def cui_main(screen, directory, static, begin, end) :
    # parse through the command line arguments (check if -d option)

    model = PNAModel()
   
    if static != None and directory != None :
         sys.exit(2)
    elif directory != None :
        add_data(model, directory, begin, end)
    elif static != None :
        add_data(model, static, begin, end)

    if directory :
        #print 'Directory to watch for updates needs to be specified'
        dirwatch = DirectoryWatcher(model, directory)
        interface = CursesInterface(screen, model, dirwatch)
        interface.interact()
    else :
        for file in args :
            model.add_file(file)
        interface = CursesInterface(screen, model, None)
        interface.interact()
        
    """