Как я могу напечатать индикатор прогресса на той же линии? - PullRequest
1 голос
/ 25 марта 2019

Я пытаюсь вставить индикатор выполнения в цикл for, но индикатор выполнения перемещается на следующую строку после каждой итерации. Как я могу поставить его в одну строку? Я использую затмение и код ниже:

from selenium import webdriver
import time
import os
import datetime
from tqdm import trange


i=0
for i in trange(b):
    day = driver.find_elements_by_xpath('//*[@id="aaaaa"]/div/table[2]/tbody/tr/td[@style="background-color: rgb(204, 204, 0); color: rgb(128, 0, 0);"]')
    day[i].click()

    time.sleep(2)

    download = driver.find_element_by_xpath('//*[@id="content1"]/div/div[4]/div/div/table/tbody/tr[2]/td[2]/a[2]')
    download.click()

    driver.get('https://npp.gov.in/dgrReports') 

    pre_month = driver.find_element_by_xpath('//*[@id="aaaaa"]/div/table[1]/tbody/tr/td[1]')
    pre_month.click()    


...