예제 #1
0
def main(argv):
    path = argv[0]  # must be from dir file, a horrible coupling indeed
    argv.pop(0)
    if len(argv) > 1:
        if argv[0] == '-tutorial':
            d = TutorialDir()
            if len(argv) == 2 and argv[1].isdigit:
                d.tutor_info.delete_x_times(int(argv[1]))
            else:
                d.set_current_directory(os.user.expanduser('~'))
            d.start(path)
            
    elif len(argv) == 1:
        if argv[0] == '-tutorial':
            d = TutorialDir()
            d.start(path)
        else:
            d = DirApp()
            d.start(path)
    else:
        DirApp().start(path)