From: Kevin A. <al...@se...> - 2004-11-29 21:29:19
|
On Nov 28, 2004, at 2:37 PM, Gregory Pi=F1ero wrote: > Hi everyone, > > I'm trying to use py2exe on a small pythoncard app I made but when I > try to run the exe it says errors occured and in the log file it says: > > Traceback (most recent call last): > File "JobRater.py", line 60, in ? > File "PythonCard\model.pyc", line 329, in __init__ > File "PythonCard\resource.pyc", line 45, in __init__ > File "PythonCard\util.pyc", line 30, in readAndEvalFile > IOError: [Errno 2] No such file or directory: 'JobRater.rsrc.py' > > Unfortunately I'm not sure what the correct method for using py2exe > with pythonCard is so I'm not sure if I'm doing something wrong or > what. This is my setup.py file: > > from distutils.core import setup > import py2exe > > setup(windows=3D["JobRater.py"]) > > And then I just call it as instructed on the py2exe website: > >>> python setup.py py2exe > > Any ideas what I could be doing wrong? Below I'll paste JobRater.py > and JobRater.rsrc.py just in case there's something wrong in those. > > Thanks, > > Greg > You need to specifically import the component modules that you use in=20 your resource file, but your initial problem is that you need to=20 included the .rsrc.py and any other data files you use either by=20 manually copying them into the directory or just including them in the=20= py2exe data files list. If you look at the minimalStandalone sample=20 you'll see setup.py ... from distutils.core import setup import py2exe setup( name =3D "minimal", console =3D ["minimal.py"], data_files =3D [ (".", ["readme.txt", "minimal.rsrc.py"]) ] ) ka |