예제 #1
0
def logout_account():  # 注销
    '''
    注销登录
    '''
    print("logout...")
    logout()
    print('Done!')
예제 #2
0
파일: login.py 프로젝트: New-Future/NKUWLAN
def loop():  # 循环登录
    global password
    if not load_conf():
        setdefaulttimeout(2)
        logout()

    setdefaulttimeout(3)
    while not getAccount():
        password = None
        print ("%s try login fialed!\n%s" % (account, error()))
    else:
        print ("Login SUCCESS!")

    setdefaulttimeout(TIMEOUT)
    while True:
        print (time.ctime())
        if auto():
            time.sleep(cir_time)  # 每隔cir_time秒执行一次
        else:
            time.sleep(cir_time / 5)  # 每隔cir_time秒执行一次
예제 #3
0
def loop():  # 循环登录
    global password
    if not load_conf():
        setdefaulttimeout(2)
        logout()

    setdefaulttimeout(3)
    while not getAccount():
        password = None
        print "%s try login fialed!\n%s" % (account, error())
    else:
        print "Login SUCCESS!"

    setdefaulttimeout(TIMEOUT)
    while True:
        print time.ctime()
        if auto():
            time.sleep(cir_time)  # 每隔cir_time秒执行一次
        else:
            time.sleep(cir_time / 5)  # 每隔cir_time秒执行一次
예제 #4
0
def logoutAccount():
    print "logout..."
    logout()
    print 'Done!'