I really like the package, it's doing what I want, and behaves as expected.
There is a single thing I would like to have and I would write the PR for it: I want to be in control of the main loop, like this:
import random
import pystray
class MyApp:
def __init__(self):
self.pystrayIcon = pystray.icon("foo")
def whatever(self):
print("bar")
r = random.random()
if r < 0.01:
return True
else:
return False
def main(self):
while True:
r = self.whatever()
self.pystrayIcon.mainstep() # this would be new
if r:
self.pystrayIcon.stop()
break
if __name__=="__main__":
myapp_instance = MyApp()
myapp_instance.main()
From what I can see, all that's required is to not while True: yield the events?
Hey there,
I really like the package, it's doing what I want, and behaves as expected.
There is a single thing I would like to have and I would write the PR for it: I want to be in control of the main loop, like this:
From what I can see, all that's required is to not
while True: yield
the events?Would you accept such a PR?