Changeset 313

Show
Ignore:
Timestamp:
Sun Apr 1 19:11:09 2007
Author:
giovannibajo
Message:

Fix PyXML import hook under NT

Files:

Legend:

Unmodified
Added
Removed
Modified
  • trunk/hooks/hook-xml.py

    r43 r313  
    21 21     import os, tempfile, sys, string, marshal  
    22 22     fnm = tempfile.mktemp()  
    23       if string.find(sys.executable, ' ') > -1:  
    24           exe = '"%s"' % sys.executable  
      23  
      24     exe = sys.executable  
      25  
      26     # Using "echo on" as a workaround for a bug in NT4 shell  
      27     if os.name == "nt":  
      28         cmd = '"echo on && "%s" -c "import xml;print xml.__file__" > "%s""' % (exe, fnm)  
    25 29     else:  
    26           exe = sys.executable  
    27       os.system('%s -c "import xml;print xml.__file__" >"%s"' % (exe, fnm))  
      30         cmd = '""%s" -c "import xml;print xml.__file__" > "%s""' % (exe, fnm)  
      31     os.system(cmd)  
      32  
    28 33     txt = open(fnm, 'r').read()[:-1]  
    29 34     os.remove(fnm)  
  • trunk/doc/CHANGES.txt

    r312 r313  
    17 17  + Fix support for PIL when imported without top-level package ("import  
    18 18    Image").  
      19  + Fix PyXML import hook under NT (thanks to Lorenzo Mancini)  
    19 20  
    20 21