Kills python + all subprocesses, restarts with the same args, Windows only, works with pyinstaller
Project description
Kills python + all subprocesses, restarts with the same args, Windows only, works with pyinstaller
pip install babyonemoretime
from babyonemoretime import restart_everything
from time import sleep
import subprocess
import sys
sleep(4)
if sys.argv[1] == "n":
subprocess.Popen("notepad.exe")
else:
subprocess.Popen("word.exe")
sleep(4)
restart_everything(pyfile=__file__, sysarv=sys.argv, restart=False) # kills everything
restart_everything(pyfile=__file__, sysarv=sys.argv, restart=True) # kills everything and restarts
# python.exe resa.py n
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
babyonemoretime-0.10.tar.gz
(20.8 kB
view hashes)
Built Distribution
Close
Hashes for babyonemoretime-0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a54a7c9d3a0d83c33d284dfefd4c3a3f7f22a8ce3e741220e7655e67fb4d3d58 |
|
MD5 | bc38c5cea45ad86c506babf298b47dd4 |
|
BLAKE2b-256 | 1ad8f2f97badf6283d60eb8d8b055cccc963b8b628ba0b4beffdc57001126a6b |