dynamically run makepy on win32

Mark Hammond mhammond at skippinet.com.au
Tue Oct 15 00:53:20 CEST 2002

Simon Brunning wrote:
>>From:	dsavitsk [SMTP:dsavitsk at e-coli.net]
>>is there a reasonable way to determine whether makepy has been run on a
>>particular object, and if not, run it?
> win32com.client.gencache.EnsureModule does exactly this.

As does EnsureDispatch, which is probably closer to what the original 
poster requested - this works on an object and returns a makepy version 
of the object, rather than working at the module level.

Some objects will fail on EnsureDispatch, where they would work with 
EnsureModule, but this is rare.


More information about the Python-list mailing list