#!/usr/bin/env python |
# encoding: utf-8 |
''' |
cmd ssh命令行进度条百分比动态更新,彩色 |
https://yuncode.net/python-tech |
''' |
from time import sleep |
from tqdm import tqdm |
class progress: |
def __init__( self ): |
pass |
def hello( self ): |
return self |
def run( self ): |
''' |
The program entry |
''' |
for i in tqdm( range ( 1 , 500 )): |
# 模拟你的任务 |
sleep( 0.01 ) |
sleep( 0.5 ) |
if __name__ = = '__main__' : |
progress().hello().run() |