LoginSignup
1
1

More than 5 years have passed since last update.

めざせpythonライブラリマスター (13)easydev

Posted at

【ライブラリ説明】

 プログラムの進捗度と実行時間を計測

【プログラム】

easydev.py
# -*- coding: utf-8 -*-

from easydev import Progress
pb = Progress(10)
for i in range(1,10+1):
    x = []
    for j in xrange(1000000):
        x.append(j)
    pb.animate(i)

【結果】

result
[---              10%                  ] 1 of 10 complete in 0.2 sec 
[-------          20%                  ] 2 of 10 complete in 0.5 sec 
[-----------      30%                  ] 3 of 10 complete in 0.7 sec 
[---------------  40%                  ] 4 of 10 complete in 1.0 sec 
[-----------------50%                  ] 5 of 10 complete in 1.2 sec 
[-----------------60%--                ] 6 of 10 complete in 1.5 sec 
[-----------------70%------            ] 7 of 10 complete in 1.7 sec 
[-----------------80%----------        ] 8 of 10 complete in 1.9 sec 
[-----------------90%--------------    ] 9 of 10 complete in 2.2 sec 
[-----------------100%-----------------] 10 of 10 complete in 2.5 sec

【参考サイト】

 pypi
 github
 document

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1