Jacob Kruger wrote:
#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]
Also tried changing it to:
includes : [mapDataFn.py]
and, same issue/error.
Here's a trivial example. When I run python setup.py py2exe, it
creates dist\main.exe and dist\library.zip, and the zip contains
mapDataFn.pyc, among all the standard modules.
C:\Dev\xxxtype main.py
from mapDataFn import fnTakeItem
print fnTakeItem()
C:\Dev\xxxtype mapDataFn.py
def fnTakeItem():
return 123
C:\Dev\xxxtype setup.py
from distutils.core import setup
import py2exe
options = {
bundle_files: 1,
ascii: 1, # to make a smaller executable, don't include the encodings
compressed: 1, # compress the library archive
}
setup(
# The first three parameters are not required, if at least a
# 'version' is given, then a versioninfo resource is built from
# them and added to the executables.
version = 1.0.0,
description = Test,
name = MapTest,
options = {'py2exe': options},
# targets to build
console = [main.py],
)
C:\Dev\xxxpython setup.py py2exe
running py2exe
creating C:\Dev\xxx\build
creating C:\Dev\xxx\build\bdist.win32
creating C:\Dev\xxx\build\bdist.win32\winexe
creating C:\Dev\xxx\build\bdist.win32\winexe\collect-2.6
creating C:\Dev\xxx\build\bdist.win32\winexe\bundle-2.6
creating C:\Dev\xxx\build\bdist.win32\winexe\temp
creating C:\Dev\xxx\dist
*** searching for required modules ***
*** parsing results ***
*** finding dlls needed ***
*** create binaries ***
*** byte compile python files ***
byte-compiling C:\Dev\xxx\mapDataFn.py to mapDataFn.pyc
byte-compiling c:\apps\python26\lib\StringIO.py to StringIO.pyc
... lots of output deleted ...
C:\Dev\xxxcd dist
C:\Dev\xxx\distmain.exe
123
C:\Dev\xxx\dist
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32