mirror of
https://github.com/kennethreitz/clint.git
synced 2026-06-05 06:46:16 +00:00
added progressbar example
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/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 progressbar
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
for i in progressbar(range(100)):
|
||||
sleep(random() * 0.2)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user