1

I want to get the list of programs that shows in the Applications tab of Windows Task Manager(include the application icon and its name) , I wonder which Windows APIs should I use ?

If I want to do the same thing on Ubuntu ,then which Ubuntu APIs should I use ?

iMath
  • 2,326
  • 2
  • 43
  • 75

3 Answers3

2

for Ubuntu you can see this post:

How to get list opened windows in PyGTK or GTK in Ubuntu?

for windows you have the WMI module you can see this post:

I'm trying to get all the processes and applications that are currently running using Python on Windows 7

Community
  • 1
  • 1
Kobi K
  • 7,743
  • 6
  • 42
  • 86
1

Afaik Qt itself will not allow you to do this, at least it did not in prior versions. To solve this for windows you will have to use win-api EnumProcesses while in linux you could use the /proc filesystem, which holds information about running processes

Sebastian Lange
  • 3,879
  • 1
  • 19
  • 38
1

You could consider using the psutil library from here or here it provides a cross platform set of tools including ps.

Steve Barnes
  • 27,618
  • 6
  • 63
  • 73