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.
16 lines
425 B
16 lines
425 B
11 months ago
|
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')
|
||
|
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)
|