Code Monkey home page Code Monkey logo

pytaskbar's Introduction

PyTaskbar

The ultimate taskbar progress python package!

visitor badge

Docs Here!

Works for both terminals and GUIs!

Requirements:

    comtypes
    PyGetWindow

Installation

click here


Example:

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!')

Happy Coding!

pytaskbar's People

Contributors

liamswayne avatar n3rdium avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pytaskbar's Issues

Why opening new window

Describe the bug
It opens a new window however it should give it in the same cmd/application (it might get a bit complex in intergrrated terminals) and option to open new or try to intergrate or merge in a existing gui/tkinter window object
image

And, there can be a event or "str" method in the taskbar progress class that returns true if its self.state == "done" and false vice versa. The example.py keeps saying close me, there should be event so that it will stop saying and exit as its closed.

  • you can close your python app and progress window keeps running

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Error state re-sets progress to 10% automatically

Describe the bug
Somehow the setState 'warning' state behaves differently than the 'error' state.

To Reproduce
I have the following code:

import time
import PyTaskbar
TaskBarStatus = PyTaskbar.Progress()
TaskBarStatus.init()

for i in range(20):
    time.sleep(0.7)
    TaskBarStatus.setProgress(100)
    TaskBarStatus.setState('error')
    time.sleep(0.7)
    TaskBarStatus.setProgress(100)
    TaskBarStatus.setState('warning')
    time.sleep(0.7)
    TaskBarStatus.setState('normal')
    
input("Press Enter to continue...")

Expected behavior
This piece of code should make my taskbar flash red and yellow while keeping the bar full.

Screenshots
Only the yellow warning state is being affected by the previous setProgress instruction.
grafik

Desktop (please complete the following information):

  • OS: Windows 10 (latest updates)

Windows Terminal support

Describe the bug
When using this on Windows Terminal, instead of making a progress bar on the Windows Terminal process, it opens an OpenConsole.exe window instead

To Reproduce
Steps to reproduce the behavior:

  1. Simply run python install.py while being in Windows Terminal

Expected behavior
The windows terminal window gets the progress bar, not opencolse

Screenshots
1UGAj2f80q

Desktop (please complete the following information):

  • OS: Windows 10 21H2 Pro / Windows 10 2004 Enterprise (Windows Sandbox)
  • Windows Terminal installed via Scoop / Unpacked msix

Maintainers needed!

Looks like the community likes this project. I switched to Linux about a year ago, so I can't really work on this project anymore since I don't have a windows machine.
I'm looking for maintainers for this project who use windows and know python. You can also improve the readme and the docs, since the ones I made are terrible.

Thanks,
N3RDIUM.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.