If you want process please refer to this post @Nick Perkins and @hb2pencil gave a very good solution.
To get all opened application titles you can use the code below i am using it also in one of my drivers, it's from this site
There is also another post with similar question here and @nymk gave the solution.
import ctypes
EnumWindows = ctypes.windll.user32.EnumWindows
EnumWindowsProc = ctypes.WINFUNCTYPE(ctypes.c_bool, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_int))
GetWindowText = ctypes.windll.user32.GetWindowTextW
GetWindowTextLength = ctypes.windll.user32.GetWindowTextLengthW
IsWindowVisible = ctypes.windll.user32.IsWindowVisible
def foreach_window(hwnd, lParam):
titles = []
if IsWindowVisible(hwnd):
length = GetWindowTextLength(hwnd)
buff = ctypes.create_unicode_buffer(length + 1)
GetWindowText(hwnd, buff, length + 1)
titles.append(buff.value)
print buff.value
return titles
def main():
EnumWindows(EnumWindowsProc(foreach_window), 0)
#end of main
if __name__ == "__main__":
main()