27 Answers
+ 3
try this to debug:
pythonw.exe yourScript.pyw 1>stdout.txt 2>stderr.txt
can you post your script?
+ 3
Abdurahman Jemal Adem
maybe Jitesh Singh can help explain what the main goal of the topic is.
It is not actually about ui and popups, but how to make a python program run invisibly in your computer or device. You cannot do this in Sololearn.
+ 2
oh. I thought it was a lieral gui popup 😁. so i created them with pysimplegui.
Anyway, the main goal is scheduled background script execution.
The executed task can actually be anything.
+ 2
JaScript
yes, async operations are probably better for more complex things
+ 1
You can use this application, Sololearn, for your own code. Just click on the 'Create', then choose the language of your code and write down your code, and hit run.
+ 1
It is a program to notify, it just make a notification pop on the screen.
+ 1
I assume your script is running in a continuous loop? Are you sure it is not killed when the popup is closed? How about network connection? is it being automatically stopped for some other reason?
+ 1
Yeah but , using time module, it sleeps for 1 hr than notifies again.
+ 1
Looking at stackoverflow suggestions, maybe use the sched module for scheduling.
do a trial with smaller time interval first for testing.
https://stackoverflow.com/questions/59125493/how-to-constantly-run-JUMP_LINK__&&__python__&&__JUMP_LINK-script-in-the-background-on-windows
+ 1
Jitesh Singh
it is an interesting idea. Here is my test. The code will not work in Sololearn, but I got it working as a hidden background process in my laptop.
https://sololearn.com/compiler-playground/cDFvvNI3QHD9/?ref=app
+ 1
Bob_Li
There is no module with the name of "PySimpleGUI".
+ 1
Abdurahman Jemal Adem
you can't run it here in Sololearn
you have to run it in a laptop or pc and also pip install the necessary modules.
Sololearn is just a learning platform. There are so many things you can do with an actual development setup.
+ 1
Bob_Li
I have seen that. On here, the error it raises is no module with that name.
+ 1
Abdurahman Jemal Adem
It has a popup gui, so it cannot be executed in Sololearn. Also, scheduled function execution is also probably impossible in Sololearn, since the playground have time limits...
+ 1
Bob_Li My code is very much similar to yours except the fact that I have used plyer module instead of PySimpleGui but your code is wonderful.
+ 1
Jitesh Singh pysimplegui is simpler. I will check out the plyer module.
plyer looks nice, mobile-centric. I have not played with the Kivy ecosystem for a long time. But I can't find any popup gui examples... maybe you mean Kivy Popup?
+ 1
Bob_Li I think I didn't make you understand it very well. By a popup notification, I meant a simple alert notification appearing in the side of the screen.
+ 1
Bob_Li
OK 👍 thanks