Generation

generate functionMon, 05 Dec 2022

open powershell send keys to powershell show all disks copy disk c

from subprocess import Popen from time import sleep def open_powershell(): print("open powershell") p=Popen("powershell", shell=True) sleep(3) p.kill() def send_keys_to_powershell(keys): print("send keys to powershell") p=Popen("powershell", shell=True) sleep(3) p.send_keys(keys) sleep(2) p.kill() open_powershell() send_keys_to_powershell("Get-Disk")

Want to kickstart your project?Use the new AI Studio to create your code