2Qs
Cameron Laird
claird at lairds.us
Sat Jun 24 21:15:42 EDT 2006
In article <e7k3hk$560$1 at ss408.t-com.hr>,
SuperHik <junkytownMAKNI at gmail.com> wrote:
>1st question:
>
>If a make an exe with i.e. py2exe, can I get any kind of error/bug
>report from the exe file saved into a file error.log and how?
.
.
.
Yes.
It's hard to know what more to say, in the absence of knowledge about
your background. I *think* what you're after is this: define a
import sys
def main():
# All the real work starts here.
do_first_important_thing()
do_more()
still_more()
finish_it_all()
try:
main()
except:
problem = sys.exc_info()
fp = open("error.log", "w")
fp.write("The problem was '%s'.\n", str(problem[1]))
fp.close()
More information about the Python-list
mailing list