6.0/10 (1 صوت )




  • مرات التنزيل: 192
  • متطلبات التشغيل:
  • الحجم:
  • الترخيص:
  • الاصدار : 0.1
  • اضيف في: 2011-06-08 00:00:00
  • اخر تحديث: 05/08/2011
  • الموقع علي الانترنت:






Description




progbar is a simple progression bar by Yves-Gwenael Bourhis, written in Python.Usage:Class ProgBar(name, lenght): name is a string lenght is an integer which represents the number of elements in the barMethods:start(): Start the progression bar in a thread the progression and thread stop automaticaly when the "percent" property reaches 100%stop(): Stop the progression bar and the thread It is recommended to call the join() method afterfill(): Add an element to the bar, and match the corresponding percentageisAlive(): Returns True if the bar's thread is running, False otherwisejoin(): Wait until the threaded bar terminates. It is recomended to call this method after a stop() callProperties:percent: percentage of the bar progressionExample Using step progression:>>> def printatestbar1():... bar = ProgBar('test1', 20)... bar.start()... while bar.isAlive():... time.sleep(0.1)... bar.fill()... bar.join()... del(bar)>>> printatestbar1()test1 [####################] 100%>>>Example Using percentage progression:>>> def printatestbar2():... bar = ProgBar('test2', 20)... bar.start()... while bar.isAlive():... bar.percent += 1... time.sleep(0.1)... bar.join()... del(bar)>>> printatestbar2()test2 [####################] 100%>>>Example Interupting the progression bar:>>> def printatestbar3():... bar = ProgBar('test3', 20)... bar.start()... while bar.isAlive():... bar.percent += 1... if bar.percent == 50:... bar.stop()... break... time.sleep(0.1)... bar.join()... del(bar)>>> printatestbar3()test3 [##########- ] 50%>>> Requirements:

· Python









التعليقات علي progbar 0.1
اضافة تعليق

تعليقات الفيسبوك

تعليقات الموقع