From: Peter B. <Pet...@ug...> - 2004-11-28 14:19:18
|
On Sunday 28 November 2004 00:50, Chris Liechti wrote: > Peter Bienstman wrote: > > I'm trying to use sys.setappdefaultencoding() in my application, for > > which I need the application to import sitecustomize.py. > > > > According to the mailing list, I should be able to pass a command line > > option 'force-imports=3Dsitecustomize' to py2exe, but the force-imports > > agument doesn't seem to be recognized in the latest version of py2exe. > > > > How can I solve this problem? > > maybe: > http://starship.python.net/crew/theller/moin.cgi/EncodingsAgain Not really. I already had '--packages=3Dencodings' as command line option. = My=20 problem is not that the encodings are not included, my problem is that I wa= nt=20 to use 'sys.setappdefaultencoding()', which only works if 'sitecustomize.py= '=20 is imported transparently before all other modules. sitecustomize.py is imported when I run my program as a python script, but = not=20 when using py2exe. Peter |