import win32process
for process in win32process.EnumProcessModules(-1):
    name = win32process.GetModuleFileNameEx(-1, process)
if 'python27.dll' in name:
    pass
location of python27.dll from python itself