[Tutor] Fw: capturing crashing application (application runningunder windows environment) - now sending with right adress ...

Alan Gauld alan.gauld at blueyonder.co.uk
Wed Dec 10 04:55:59 EST 2003


> which would save crashing apllication data.

Thats really quite difficult since you dont know in advance when
a program will crash! So you don;t know when to start saving the
data.
One technique oftenn used on industrial mainframe programs is to
save the data in a "circular list", that is a list that has a
fixed number
of items and when you reach the end starts from the top again,
overwriting what used to be there. Even that has problems since
you need to know which item was last written after the crash, so
a separate item containing the position also needs to be saved.

All this constant saving of data slows the system down so most
programs don't do that.

> It is about Python code to be executed in Windows without
Python
> installed. I read here on Tutor something about making some
> somefile.py2exe executable, but could you tell some more about
this,

The Python interpreter needs to be there (along with any modules
you use) to run your program. py2exe is a program that will take
your Python script and bundle it along with your modules and the
python interpreter into a single file and then make that file
look
like a normal Windows exectutable (an .exe file). So the end user
gets what looks like a noral program, but actually it just runs
python
and your script together. The problem with this approach is that
the exe file is quite big so if you give out lots of these your
user
winds up with multiple Pythons installed!

So if you give out lots of little programs its better to get the
user to
install Python (maybe as part of an installation script). This is
the
Java approach. On the other hand, if you only want to give out 1
program py2exe might be the best way. (this is the C++ approach)

Alan G.




More information about the Tutor mailing list