win32com:MakePy -- Early Binding without the size jitters?
Mark Hammond
MarkH at ActiveState.com
Sat Mar 10 21:35:37 EST 2001
Clark C. Evans wrote:
> Hello. I'd like to use early-binding with about three COM
> libraries, each one of the stub.pyc files over 100KB (with
> one in particular over 300KB). However, I'm only using
> about a dozen methods (including constructors, etc) from
> each library. I was wondering... is it safe to delete
> methods/interfaces which I'm not using? I've deleted
> a few, and it still works for my purposes, so I was
> wondering if I'm shooting myself in the foot -- or if
> there is a methodological approach to this pruning?
> It'd be cool to get the .pyc alot smaller; no use
> toossing away 1MB of memory when I only need a few K...
>
If you are using the gencache functions to create makepy files, try
passing "bForDemand=1" to the functions. This will only generate what
is actually used by the program, as it is used.
Mark.
More information about the Python-list
mailing list