You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
439 B

import subprocess
import time
def CrearProceso():
try:
SW_SHOWMAXIMIZED = 3
info = subprocess.STARTUPINFO()
info.dwFlags |= subprocess.STARTF_USESHOWWINDOW
info.wShowWindow = SW_SHOWMAXIMIZED
proc = subprocess.Popen('notepad.exe', startupinfo=info)
return proc
except subprocess.CalledProcessError as e:
print(e.output)
p = CrearProceso()
print ("El PID de este proceso es: " + str(p.pid))
time.sleep(5)

Powered by Informatica FP.