• Welcome to Valhalla Legends Archive.
 

[Python] regarding py2exe

Started by topaz, May 17, 2006, 12:20 AM

Previous topic - Next topic

topaz

After I've compiled the modules into an exe, the end result seems to be rather large; about 3mb's worth of dependencies, and the actual file is only 14kb!

So - what can I do to reduce the size to an acceptable range (70-180kb)?
RLY...?

rabbit

UPX or something of the sort.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Yegg

I'm guessing that it is because you imported some very large modules.

From your Python code, show us what you imported.

topaz

RLY...?

Yegg

That's odd. I never had that issue. Not really sure what to say, other than asking on forums.devshed.com.

topaz

#5
Well, for starters, python24.dll and msvcr71.dll are about 2.5mb's together. If I try to remove one or the other or both, it doesn't run properly.

rabbit: I can't pack python-related files, the error says something about an unexpected value in the PE header.
RLY...?

Banana fanna fo fanna

It's because the interpreter is embedded in the exe.

topaz

Quote from: Banana fanna fo fanna on May 17, 2006, 10:09 PM
It's because the interpreter is embedded in the exe.

So this is an inescapable problem? =[
RLY...?

Banana fanna fo fanna


topaz

#9
Oh yeah, update: apparently I was using an older version of UPX, because when I upgraded to 2.0, I could pack them! yay! Total filesize is 1.37mb, which is a significant improvement.
RLY...?

Yegg

Quote from: Topaz on May 18, 2006, 01:10 AM
Oh yeah, update: apparently I was using an older version of UPX, because when I upgraded to 2.0, I could pack them! yay! Total filesize is 1.37mb, which is a significant improvement.

I remember having a program with more code than your hello world, and PY2EXE sent it back to me as a ~60kb file. Still not sure why yours is so large.

topaz

I'm using python 2.4 = could that be why?
RLY...?

Yegg

Quote from: Topaz on May 18, 2006, 05:27 PM
I'm using python 2.4 = could that be why?

Well, when I last actually used Python the latest version was 2.3. I don't see how 2.4 would change anything, but you never know. Like I said, forums.devshed.com may have a better answer, it's worth a try.