From: Jimmy R. <ji...@re...> - 2006-02-19 15:31:25
|
Theodore KGB wrote: > Originally I used the new --custom-boot-script feature to reset stdout > and stderr.=A0 Since the custom boot script is run after = boot_common.py, > I saw no reason why I couldn't just reset stdout and stderr from my > script. =20 You certainly can put it in your script just as you have. In a normal = exe, there are a couple of differences I had in mind with the = --custom-boot-script option. First you don't have to "pollute" your = script with stuff that is only used in an executable - it just helps = keep code separated if that is important to your project. Secondly you = don't have to do any "if sys.frozen" kinds of things. The custom boot = script will only be executed when run from a packaged executable. In non console/windows builds (e.g., COM servers) it has the added = advantage of letting you insert something before executing py2exe's = built in scripts (but still after boot_common.py) that serve as the = entry point for those (e.g., before boot_com_servers.py, = boot_service.py, etc.). Jimmy |