[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
Tue Nov 12 09:18:45 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:  closed                     
Priority:  major   |    Component:  Installer                  
 Version:          |   Resolution:  invalid                    
Keywords:  python  |  
-------------------+--------------------------------------------------------
Changes (by mlt):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 Replying to [comment:1 jef]:
 > Hm, just a suggestion.  On Linux it's {{{/usr}}}, which also wouldn't
 work.  Anyway, searching PATH would work.

 There is no reason to call {{{set_executable()}}} on GNU/Linux as
 multiprocessing uses {{{fork()}}} on this platform.

 Well, perhaps it was an impulsive decision to file this issue. The main
 point was that current file system layout does not match typical one on
 this platform and contradicts the
 [http://docs.python.org/2/library/multiprocessing.html#multiprocessing.set_executable
 manual on multiprocessing]. Although the manual says ''some thing like''.
 I guess it is not a big deal to write

 {{{
 path = os.path.abspath(os.path.join(sys.exec_prefix,
 '../../bin/pythonw.exe'))
 multiprocessing.set_executable(path)
 }}}

 as long as it won't change.

-- 
Ticket URL: <http://trac.osgeo.org/osgeo4w/ticket/392#comment:2>
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