[Pythonmac-SIG] simple setup.py-for-Windows question
Charles Hartman
charles.hartman at conncoll.edu
Thu Feb 3 20:21:36 CET 2005
Sorry, simpleton time again! I've gotten the Mac app to build OK with
py2app, but now I'm trying to get my newest project ready for first
tests on Windows and running into a problem. My setup.py contains the
line
data_files = ['ScansionDictionary'],
and one of my modules contains the line
self.Dict = pickle.load(open('ScansionDictionary', 'rU'))
On Mac, this combination puts the data file inside Resources (inside
Contents inside my app's bundle). On Windows it puts the file in the
same ('dist') directory as the executable. (Is there a better, more
integrated way to do it on Windows?) And when I try to run the
executabble the pickle.load line generates this: "LookupError: no codec
search functions registered: can't find encoding". How do I fix this?
Maybe a connnected question: what is the relation between the
'data_files' argument in a setup.py file (as ordained by distutils),
and the 'resources' option to py2app?
Charles Hartman
More information about the Pythonmac-SIG
mailing list