You’re looking for os.exec*()
family of commands.
To restart your current program with exact the same command line arguments as it was originally run, you could use the following:
os.execv(sys.argv[0], sys.argv)
More Related Contents:
- int has no len error Help me please? [closed]
- Request UAC elevation from within a Python script?
- Using headers with the Python requests library’s get method
- Why are trailing commas allowed in a list?
- Replacing Numpy elements if condition is met
- Can existing virtualenv be upgraded gracefully?
- Add Variables to Tuple
- Underscore vs Double underscore with variables and methods [duplicate]
- How to update SQLAlchemy row entry?
- Does Conda replace the need for virtualenv?
- cx_Freeze crashing Python 3.7.0
- How to transform a tuple to a string of values without comma and parentheses
- How to get only the last part of a path in Python?
- Adding values for missing data combinations in Pandas
- Can python load definitions from a C header file?
- Python – re.findall returns unwanted result
- Python get current time in right timezone [duplicate]
- How to show two figures using matplotlib?
- Why is pandas.to_datetime slow for non standard time format such as ‘2014/12/31’
- How do convert unicode escape sequences to unicode characters in a python string
- Execute multiple dependent commands individually with Paramiko and find out when each command finishes
- How can I print multiple things (fixed text and/or variable values) on the same line, all at once?
- How do I install opencv using pip?
- Create single row dataframe from list of list PySpark
- Add directory to Python path in PyCharm?
- How to unpack a Series of tuples in Pandas?
- Cannot find the file specified when using subprocess.call(‘dir’, shell=True) in Python
- Deleting folders in python recursively
- What is the effect of using `python -m pip` instead of just `pip`? [duplicate]
- How to get the Tkinter Label text?