[Tutor] Re: compiling python apps
Andrei
project5@redrival.net
Wed Jul 2 13:33:02 2003
Michael Honeyfield wrote:
> hmm... the ready to run contains 3 1MB pysol_xx.pyc files. The xx being
> some numbers. I understand that its not "compiel" but more a byte code.
Indeed.
> What I dont get is that when I run the src, which is only .py's, a .pyc
> is made for each .py, so how come pysol only contains 3 of these .pyc's
> and they are much larger than the .pyc's I get when I run the scripts.
> Is there some way to "group" scripts together into a single .pyc and
> then using python to run the .pyc?
A .pyc is made when the program is executed for *every* .py file except
the main one (the one you actually execute). In so far what you get
sounds like quite normal behaviour.
I don't know what PySol is doing, but considering the size difference
(and I'm just guessing here) the "binary" modules might include some
resources (or even modules) which are somehow unpacked and used/executed
at runtime. There's a Python decompyler somewhere on the net, perhaps
you could use it on the "binary" distro and see what you find out. I've
never used the decompyler, but I've read its output can be reasonably
readable.
Andrei
=====
Mail address in header catches spam. Real contact info (decode with rot13):
cebwrpg5@bcrenznvy.pbz. Fcnz-serr! Cyrnfr qb abg hfr va choyvp cbfgf. V
ernq gur yvfg, fb gurer'f ab arrq gb PP.