I'm suggesting not to use sitecustonize.py. Instead, take a look
at gnue solution in gnue-common/src/apps/i18n.py (www.gnuenterprise.org)
On Sun, 28 Nov 2004 15:19:09 +0100
Peter Bienstman <Peter.Bienstman@...> wrote:
> 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-impor=
> > > 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=
> problem is not that the encodings are not included, my problem is that I =
> to use 'sys.setappdefaultencoding()', which only works if 'sitecustomize.=
> is imported transparently before all other modules.
> sitecustomize.py is imported when I run my program as a python script, bu=
> when using py2exe.