During the execution of Python code to hide the command prompt?

The question is
During the execution of Python code to hide the command prompt
I mean, she at the beginning should open
After entering the data user to close

PS This is not a malicious program. This program to shutdown PC by timer
March 25th 20 at 13:47
1 answer
March 25th 20 at 13:49
You can split the program into two files - extensions *.py and *.pyw.
Start *.py to enter data.
It then using subprocess to run *.pyw.

PS If Windows, it is easier to make a batch file with the contents
shutdown.exe -s-t 10
> PS If Windows, it is easier to make a batch file with the contents
If the penguin, it is easier to remember and shutdown time in the format HH:MM or the relative +N, where N is the number of hours.
> It then using subprocess to run *.pyw.
But py - console, pyw - without a console. The decision is good, but then you need to pyw to call the py file using subprocess. - Winona commented on March 25th 20 at 13:52

Find more questions by tags Python