Hello, I have a problem with this code to list the processes. How do I remove the reference to the subject?
def P_buscar_proceso(self,proceso,intentos): # P_buscar_proceso(self,proceso,intentos=1): # Se obtiene la lista de procesos y se mira si existe, # Si intento no se define, solo se mira 1 vez import win32pdh contador=0 list = None while contador < intentos: contador = contador + 1 del list list = win32pdh.EnumObjectItems(None, None , 'proceso' , win32pdh.PERF_DETAIL_WIZARD , 0 ) print list x = proceso in list[1] print x if x == 1: result = " "+proceso+" Is Running" print result break else: result = " "+proceso+" Is Not Running..." #win32api.WinExec("+proceso+") print result return(" "+proceso+" Is Not Running...") P_buscar_proceso(None,"processexplorer",1000) Un saludo
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32