def _find_w9xpopen(self):
     w9xpopen = os.path.join(os.path.dirname(_subprocess.GetModuleFileName(0)), 'w9xpopen.exe')
     if not os.path.exists(w9xpopen):
         w9xpopen = os.path.join(os.path.dirname(sys.exec_prefix), 'w9xpopen.exe')
         if not os.path.exists(w9xpopen):
             raise RuntimeError('Cannot locate w9xpopen.exe, which is needed for Popen to work with your shell or platform.')
     return w9xpopen
Пример #2
0
 def _find_w9xpopen(self):
     """Find and return absolut path to w9xpopen.exe"""
     w9xpopen = os.path.join(
                     os.path.dirname(_subprocess.GetModuleFileName(0)),
                             "w9xpopen.exe")
     if not os.path.exists(w9xpopen):
         # Eeek - file-not-found - possibly an embedding
         # situation - see if we can locate it in sys.exec_prefix
         w9xpopen = os.path.join(os.path.dirname(sys.exec_prefix),
                                 "w9xpopen.exe")
         if not os.path.exists(w9xpopen):
             raise RuntimeError("Cannot locate w9xpopen.exe, which is "
                                "needed for Popen to work with your "
                                "shell or platform.")
     return w9xpopen