Files
2023-07-07 02:32:37 +05:30

16 lines
412 B
Python

import os
import subprocess
import time
import sys
def start_chrome():
subprocess.Popen(['google-chrome','--remote-debugging-port=9222','--user-data-dir=chromedata'],stdout = subprocess.PIPE, stderr = subprocess.PIPE)
def kill_chrome():
subprocess.run(['killall','chrome'])
if __name__ == "__main__":
if sys.argv[1] == "s":
start_chrome()
elif sys.argv[1] == "k":
kill_chrome()