xml.sax in py2exe

Thomas Heller theller at python.net
Thu Jul 17 15:35:21 EDT 2003


<jubafre at brturbo.com> writes:

> I want a binnary file to my aplicattion, but py2exe don't match the
> xmll.sax module.
>
> the py2exe shows this errors:
>
> warning: py2exe: ***************************************************************
> **********
> warning: py2exe: * The following modules were not found:
> warning: py2exe: *   xml.sax
> warning: py2exe: *   win32con
> warning: py2exe: *   pywintypes
> warning: py2exe: *   os.path
> warning: py2exe: *   hexdump
> warning: py2exe: *   win32com.client.gencache
> warning: py2exe: *   win32api
> warning: py2exe: ***************************************************************
> **********
>
> but in python if i import the module, its works very well!
>
> Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import xml.sax
>>>> xml.sax
> <module 'xml.sax' from 'C:\PYTHON22\lib\site-packages\_xmlplus\sax\__init__.pyc'

Currently the released version of py2exe doesn't work with PyXML.

There is a workaround, although this should be considered as a hack,
and I'm not completely sure it will work:

Remove the lib\site-packages\xml directory, and rename
lib\site-packages\_xmlplus into lib\site-packages\xml.

Another workaround would be to remove PyXML and use the stock Python xml
support, if it's sufficient.

It may also be that the current CVS version will be able to do it,
but again I'm not sure.

Thomas




More information about the Python-list mailing list