-
[Python] os, sys 사용 해서 프로그램 파일 재 실행Python 2021. 11. 4. 17:26
import os import sys def restart(): os.execl(sys.executable, sys.executable, *sys.argv) print("Program Started") y_or_n = input("Are you gonna restart the program? y/n\n") if y_or_n == "y": restart()
'Python' 카테고리의 다른 글
[Python] babel을 이용해서 통화기호와 comma 붙여주기 (0) 2021.11.06 [Python] BeautifulSoup을 이용해서 Table 크롤링하기 (0) 2021.11.06 [Python] 원하는 파이썬 버젼에 패키지 다운받기 (0) 2021.11.04 [Python] 함수의 매개변수의 수를 자유롭게 받아보자 *args (0) 2021.11.04 [Python] dictionary 사용법 (0) 2021.11.04