Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

os.execl(sys.executable, sys.executable, *sys.argv)

import os
import sys

restart = input("
Do you want to restart the program? [y/n] > ")

if restart == "y":
    os.execl(sys.executable, os.path.abspath(__file__), *sys.argv) 
else:
    print("
The program will be closed...")
    sys.exit(0)
Comment

PREVIOUS NEXT
Code Example
Python :: .astype datetime 
Python :: get current month name python 
Python :: telegram markdown syntax 
Python :: how to install flask 
Python :: python cmd colors 
Python :: pip neat 
Python :: base64 decode python 
Python :: installing django celery beat pip 
Python :: how to apply logarithm in pandas dataframe 
Python :: on_ready discord.py 
Python :: discord.py play mp3 file 
Python :: add horizontal line plotly 
Python :: brownie to wei 
Python :: insert image to jupyter notebook 
Python :: nltk stop words 
Python :: get the number of today week python 
Python :: mp4 to mp3 in python 
Python :: django settings module LOGIN_URL 
Python :: decode url python 
Python :: acess nvidia from docker compose 
Python :: E: Unable to locate package python3-pip docker file 
Python :: remove unnamed column pandas 
Python :: send email python 
Python :: python os get output 
Python :: install python decouple 
Python :: run flask application in development mode stack overflow 
Python :: clear console in python 
Python :: get object attributes python 
Python :: require http method django view 
Python :: python connect sftp with key 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =