mirror of
https://github.com/kennethreitz/clint.git
synced 2026-06-05 23:00:18 +00:00
a95e803268
I've created a progress indicator that outputs a "mill" and added it to the `progress.py` file. Very simple stuff but its more compact than the other progress bars and it can be useful when using long labels.
23 lines
439 B
Python
Executable File
23 lines
439 B
Python
Executable File
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import sys
|
|
import os
|
|
|
|
sys.path.insert(0, os.path.abspath('..'))
|
|
|
|
from time import sleep
|
|
from random import random
|
|
from clint.textui import progress
|
|
|
|
|
|
if __name__ == '__main__':
|
|
for i in progress.bar(range(100)):
|
|
sleep(random() * 0.2)
|
|
|
|
for i in progress.dots(range(100)):
|
|
sleep(random() * 0.2)
|
|
|
|
for i in progress.mill(range(100)):
|
|
sleep(random() * 0.2)
|