Need help in Py2exe

Kirt moqtar at gmail.com
Fri Oct 20 00:22:38 EDT 2006


I have a simple scrips that Parses a XML file and prints its element.

1)Main.py
2)Handler.py
3)test.xml

The scripts works fine from comand prompt.

Now i wanted to convert it to an exe. So i wrote a setup.py scripts as
folows:

#-------------------------Setup.py----------------------------------
from distutils.core import setup
import py2exe

setup(
    name = "Main",
    description = " Parse XML",
    version = "0.1",
    windows = [
        {"script": "main.py",
        "icon_resources": [(1, "xml.ico")]
        }
    ],

    data_files=[("List.xml"),("handler.py")],
)
-------------------------------------------------------------------------------
When i run this as python setup.py py2exe. I get an main.exe file in
dist folder. But when i run the file i get an error --
Traceback (most recent call last):
  File "main.py", line 7, in ?
  File "xml\sax\sax2exts.pyc", line 37, in make_parser
  File "xml\sax\saxexts.pyc", line 77, in make_parser
xml.sax._exceptions.SAXReaderNotAvailable: No parsers found..

I think i am missing something in setup.py file. Can anyone help?




More information about the Python-list mailing list