#150: os.system fails in hook-xml
----------------------------+-----------------------------------------------
 Reporter:  r.og...@…       |       Owner:  giovannibajo      
     Type:  defect          |      Status:  new               
 Priority:  highest         |   Milestone:                    
Component:  PyInstaller     |     Version:  PyInstaller 1.3   
 Severity:  blocker         |    Keywords:  os.system hook-xml
----------------------------+-----------------------------------------------
 When running Build.py on a windows system and the python interpreter is
 installed at a directory containing a space character (e.g. C:\Program
 Files\...) the run will fail in hook-xml due to missing temporary file.
 The file is missing, because the previous os.system() call fails.
 Inspecting for cause, it fails due alleged unknown command "C:\Program".
 Obviously the command line is misinterpreted, due to beginning
 doublequotes. [[BR]]

 My proposal for a fix:

 {{{

     if string.find(sys.executable, ' ') > -1:
         exe = '"%s"' % sys.executable
         os.system('"%s -c "import xml;print xml.__file__" >"%s""' % (exe,
 fnm))
     else:
         exe = sys.executable
         os.system('%s -c "import xml;print xml.__file__" >"%s"' % (exe,
 fnm))

 }}}

-- 
Ticket URL: <http://www.pyinstaller.org/ticket/150>
Pyinstaller <http://www.pyinstaller.org>
PyInstaller Project

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.

Reply via email to