def isactiveprocess(processname):
 all = processes()
 ok = 0
 for (n, c) in all:
  if (n == processname):
   return 1
 return 0

def isactiveprocess ( processname ) : all = processes ( ) ok = 0 for ( n , c ) in all : if ( n == processname ) : return 1 return 0
check of processname is active .