Quick Start: installation example
API Docs: The Main Object
Contributing: Contributing guidelines
You can install PyTaskbar with:
pip install PyTaskbar
-
Download wheel from this distribution:LINK.
-
Do "pip install path-to-wheel.whl"
-
Try out the example now!
-
Download wheel from this distribution:LINK.
-
Once you have downloaded it, unzip the downloaded file.
-
Go to file explorer and get to the directory where you have cloned or unzipped the repository.
-
type 'cmd' in the place where you see the path.
-
hit enter.
-
type 'python install.py' and hit enter.
-
Try out the example now!
import time
import PyTaskbar
prog = PyTaskbar.Progress()
prog.init()
prog.setState('loading')
time.sleep(5)
prog.setState('normal')
for i in range(100):
prog.setProgress(i)
time.sleep(0.05)
prog.setProgress(0)
prog.setState('warning')
for i in range(100):
prog.setProgress(i)
time.sleep(0.05)
prog.setProgress(0)
prog.setState('error')
for i in range(100):
prog.setProgress(i)
time.sleep(0.05)
prog.setProgress(0)
prog.setState('done')
while True:
time.sleep(1)
print('close me!')
_________+ init(hwnd=hWnd) (called when you create the object, if hwnd is not given,this will automatically take the hwnd of the cmd window.)
_________+ setState(value:string) (one of normal,warning,error,loading or done) more
_________+ setProgress(value:int,max=100) (set taskbar progress value) more
import PyTaskbar
import time
progress = PyTaskbar.Progress()
progress.init()
#taskbar icon becoms green, or starts to display a loading animation
progress.setState('loading')
time.sleep(5)
#progress becomes yellow
progress.setState('warning')
time.sleep(5)
#progress becomes red
progress.setState('error')
time.sleep(5)
#taskbar icon is normal again!
progress.setState('normal')
import PyTaskbar
import time
progress = PyTaskbar.Progress()
progress.init()
for i in range(100):
progress.setProgress(i,100)