Re: [python-win32] Re: Getting path+executable associated with a process

2005-02-10 Thread Gabriel Reis
Hi again, thanks for the tips. I didn't use EnumProcessModules, but I got the solution as shown below: import win32api, win32con, win32process def IsRunning(filename): processes = win32process.EnumProcesses()# get PID list for pid in processes: try: handle = win32

[python-win32] Re: Getting path+executable associated with a process

2005-02-09 Thread Roger Upole
These functions in win32process should be able to get that for you: OpenProcess, EnumProcessModules and GetModuleFileNameEx The executable will be the first module returned from EnumProcessModules. Roger Gabriel Reis wrote: Hi, I want to get the executable filename and its path from a process