[python-win32] Next step trying to include extra/external file in py2exe output

Jacob Kruger jacobk at mailzone.co.za
Tue May 24 10:44:52 CEST 2011


Ok, when I now type in the following command:
python setup.py py2exe

with the following code in setup.py:
#start code

from glob import glob
from distutils.core import setup
import py2exe
data_files = [("Microsoft.VC90.CRT", glob(r'C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*'))]
setup(
console=[
dict (script="mapData.py")
],
data_files=[data_files],
options={
"py2exe" : {
"includes" : ["c:\\temp\\pythonScripts\\mapDataFn.py"]
}
}
) 

#end code

It seems to be generating the following exception/error, based on the line where I assume I'm trying to tell it to include the contents of the file, mapDataFn.py?

#error text from console window
    raise ImportError, "No module named " + qname
ImportError: No module named c:\temp\pythonScripts\mapDataFn

Should I rather copy that file to somewhere else, and then just tell it to do something like:
"includes" : ["mapDataFn"]

Or should I maybe just run an import higher up inside setup.py itself?

Sorry if I'm misunderstanding anything/everything...<smile>

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'



More information about the python-win32 mailing list