-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to send notifications to other users and/or send from daemon process? #23
Comments
I just tried using the package from a daemon running in user space ( I was somewhat surprised to see that a shell call to import os
command = f'''
osascript -e 'display notification "This is a notification" with title "Notifying"'
'''
os.system(command) but this does not: from mac_notifications import client
client.create_notification(title="This is a notification", subtitle="Notifying") The error is the same as when I attempted to call
|
This seems to happen not just when run by
I found that if I just disabled all of the |
First of all, thanks for raising the issue and using the package. Nice to see you found a solution. Do you think we could make this an option in the package where you specify whether you want an asynchronous flow or the flow without any multiprocessing? |
Yes, that's more or less exactly what I did, albeit in a very janky af fashion. It's your package; can be configured however you want. Could just be an argument to |
So this is pretty weird - i found that if i instantiate a my application is based on interestingly a new problem crops up when i do that in the form of a warning:
which strikes me as almost certainly a more benign version of the error that caused the crash, given that the "fd" |
closing this because it's actually an issue with twisted itself |
I tried to call
create_notification()
from a daemon process that runs asroot
and it failed withbuiltins.ValueError: bad value(s) in fds_to_keep
. That sort of makes sense given thatroot
isn't a regular user. While I'm not sure this is even possible I was hoping to find a parameter for theuserInfo
argument that the objective-cNSUserNotification
constructor takes and didn't see anything. Would it be possible to implement such a thing? I could maybe help with a pull request.The text was updated successfully, but these errors were encountered: