pickle and py2exe

Justin Straube justinstraube at charter.net
Sun Dec 5 21:15:27 EST 2004


On 3 Dec 2004 01:46:38 -0800, johan@ (Johan Lindberg) wrote:

Thanks Johan, 

>I'm assuming that your library.zip now has several encoding-files in
>it? And more specifically that you have a file called
>"string_escape.pyc" in path "encodings". Right?

I had found a stupid mistake in my setup.py. I corrected it and the .zip now has
the string_escape.pyc file in the correct path. And also the program runs as it
should. 

> # encoding= iso-8859-1
> spam= "Det här är svenska"
> print spam.decode("string-escape")
>
>What happens when you compile that script to an exe using the above
>setup.py?
>(don't forget to change windows= ["spam.py"] to console= ["spam.py"])

This gives a LookupError: no codec search function registered: can't find
encoding

I then tried with the encoding package added and the .exe did print the spam
string.  

>Also you might want to try the py2exe-users list (see
>http://aspn.activestate.com/ASPN/Mail/Browse/Threaded/py2exe-users).

Thanks, Ill check this out. 


Regards,
Justin Straube



More information about the Python-list mailing list