From: Thomas H. <th...@py...> - 2004-06-01 19:29:13
|
Phil Rittenhouse <Phi...@ds...> writes: > Hi Dirk, > >> I use the functions >> >> def DllRegisterServer(): >> def DllUnregisterServer(): >> >> for code to run while --register and --unregister >> This works for me in py2exe-0.5. > > Thanks for your response. Where do you put your functions so that > they get called by --register and --unregister? I found that py2exe > put in it's own registration boot code and did not call my > > if __name__ == '__main__': > > code. I think (*) you just have to provide them in the main script. Note that each py2exe'd executable gets some 'boot' code which is executed before the main script starts - for com servers it is py2exe/boot_com_servers.py. (*) This part of the code has been written by Mark Hammond. Hope I got it right in the above explanation. Thomas |