Skip to main content

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


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)

Uploaded Source

Built Distribution

babyonemoretime-0.10-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

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

Hashes for babyonemoretime-0.10.tar.gz
Algorithm Hash digest
SHA256 c1edf6bd58e4b30775984a717a36998dbf5428d2ca79a726ede8cdc98c3fd70d
MD5 9b15712f06f4234972758b8f5b4eac3e
BLAKE2b-256 8d400a3df516c412c3165af1ce429f2e52617bd11aa7951cfd5aa20376a58486

See more details on using hashes here.

File details

Details for the file babyonemoretime-0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for babyonemoretime-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 a54a7c9d3a0d83c33d284dfefd4c3a3f7f22a8ce3e741220e7655e67fb4d3d58
MD5 bc38c5cea45ad86c506babf298b47dd4
BLAKE2b-256 1ad8f2f97badf6283d60eb8d8b055cccc963b8b628ba0b4beffdc57001126a6b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page