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 details)
Built Distribution
File details
Details for the file babyonemoretime-0.10.tar.gz
.
File metadata
- Download URL: babyonemoretime-0.10.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1edf6bd58e4b30775984a717a36998dbf5428d2ca79a726ede8cdc98c3fd70d |
|
MD5 | 9b15712f06f4234972758b8f5b4eac3e |
|
BLAKE2b-256 | 8d400a3df516c412c3165af1ce429f2e52617bd11aa7951cfd5aa20376a58486 |
File details
Details for the file babyonemoretime-0.10-py3-none-any.whl
.
File metadata
- Download URL: babyonemoretime-0.10-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a54a7c9d3a0d83c33d284dfefd4c3a3f7f22a8ce3e741220e7655e67fb4d3d58 |
|
MD5 | bc38c5cea45ad86c506babf298b47dd4 |
|
BLAKE2b-256 | 1ad8f2f97badf6283d60eb8d8b055cccc963b8b628ba0b4beffdc57001126a6b |