You can use below script to list running applications in endpoint,
import subprocess;
process = subprocess.Popen(['tasklist'],stdout=subprocess.PIPE) ;
for line in iter(process.stdout.readline,''):
print line.rstrip();
Note: Please refer attach text file for script text without indentation error.
sample output would be ,
running_applications.txt (160 Bytes)