From: <dir...@rw...> - 2004-06-01 08:56:22
|
Hello, I use the functions def DllRegisterServer(): def DllUnregisterServer(): for code to run while --register and --unregister This works for me in py2exe-0.5. Dirk |
From: Phil R. <Phi...@ds...> - 2004-06-01 14:16:32
|
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. Thanks Phil |
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 |
From: Phil R. <Phi...@ds...> - 2004-06-01 21:02:40
|
Hi Thomas and Dirk, > 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. Yup. Works like a charm. Thanks, Phil |