[Osgeo4w-trac] [osgeo4w] #392: sys.exec_prefix does not point to folder with pythonw.exe thus introducing inconsistency, e.g. with multiprocessing in QGIS plugins

OSGeo4W trac_osgeo4w at osgeo.org
Mon Nov 11 11:26:53 PST 2013


#392: sys.exec_prefix does not point to folder with pythonw.exe thus introducing
inconsistency,e.g. with multiprocessing in QGIS plugins
-------------------+--------------------------------------------------------
Reporter:  mlt     |       Owner:  osgeo4w-dev@…              
    Type:  defect  |      Status:  new                        
Priority:  major   |   Component:  Installer                  
 Version:          |    Keywords:  python                     
-------------------+--------------------------------------------------------
 Multiprocessing python module on Windows platform relies on starting a new
 process as that platform lacks fork(). Head-on attempt to use that module
 from, e.g, QGIS plugin results in a launch of another QGIS instance. To
 circumvent this,
 [http://docs.python.org/2/library/multiprocessing.html#multiprocessing.set_executable
 multiprocessing documentation suggest] to use

 {{{
 set_executable(os.path.join(sys.exec_prefix, 'pythonw.exe'))
 }}}

 however pythonw.exe is shipped in bin/ and not in apps/Python27/ where
 exec_prefix points to.

-- 
Ticket URL: <http://trac.osgeo.org/osgeo4w/ticket/392>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer and package environment for the OSGeo stack.


More information about the Osgeo4w-trac mailing list