Importing XML modules in py2exe or Installer?

Gordon McMillan gmcm at hypernet.com
Sat Jul 14 15:20:00 EDT 2001


[posted and mailed]

Gustaf Liljegren wrote: 

> Gordon McMillan <gmcm at hypernet.com> wrote:

[snip]

>>Edit myscript.cfg and put packages=_xmlplus in the PYZ section.
> 
> It don't work. Here's what I have done:

[snip]

> 5. Opened the jane.cfg file:
> 
> [MYINSTALL]
> type= INSTALL
> name= Install_jane.exe
> bindepends= jane.py
> zlib = INSTALLZLIB
> misc= MYSTANDALONE
> debug = 0
> excludes = pywintypes, win32api
> 
> [MYSTANDALONE]
> type= STANDALONE
> name= jane.exe
> script= jane.py
> zlib = APPZLIB
> userunw = 0
> support = 0
> debug = 0
> 
> [APPZLIB]
> name= jane.pyz
> dependencies= jane.py
> excludes= dospath, posixpath, macpath
> 
> [INSTALLZLIB]
> name = installzlib.pyz
> dependencies = installutils
> includes = installutils
> excludes = dospath, posixpath, macpath
> 
> Either these header sections are not documented as they appear, or I'm 
> looking in the wrong place. The Installer docs talk about PYZ, COLLECT,
> CARCHIVE, STANDALONE, FULLEXE and INSTALL.

Correct. Those are the "type=" lines. It defaults to ZLIB. (The actual names 
of the sections don't matter at all, so long as they're unique.)

Since you mentioned py2exe, I assumed you were using Standalone (where you'd 
have only one PYZ section, called APPZLIB), since that's (roughly) the 
equivalent of py2exe.

So put the line
packages=_xmlplus 
in the APPZLIB section.

- Gordon



More information about the Python-list mailing list