Evaluating python - a question
David Bolen
db3l at fitlinxx.com
Fri May 18 18:28:40 EDT 2001
claird at starbase.neosoft.com (Cameron Laird) writes:
> In article <u66eyecyj.fsf at ctwd0143.fitlinxx.com>,
> David Bolen <db3l at fitlinxx.com> wrote:
> .
> .
> .
> >Hmm, I wonder if anyone has tried building such a handler that would
> >dump an entire application state to a file - an internal
> >Python-specific "core dump" if you will. I normally just log
> >tracebacks and have found that sufficient but it's an interesting
> >thought.
> .
> .
> .
> It's quite a difficult problem if your notion
> of "entire application state" comprises open
> file handles, socket channels, and other such
> OS resources.
I guess it depends on what you want in the dump, and/or if you expect
the state to actually be recreatable. If you just want a state
description, then just writing out text describing the resources might
be sufficient (e.g., at least you would know that there was a socket
open and maybe for well-known object types other info like where it
was open to). Perhaps even just a __str__ dump of each object would
be useful information, although then you'd probably be creating an
awfully large dump file :-)
So maybe not - as I said, the traceback is normally enough for me (or
when it's not, I explicitly add in the few crucial items I may want).
Perhaps this sort of thing is best left in the domain of
application-centric handling.
--
-- David
--
/-----------------------------------------------------------------------\
\ David Bolen \ E-mail: db3l at fitlinxx.com /
| FitLinxx, Inc. \ Phone: (203) 708-5192 |
/ 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \
\-----------------------------------------------------------------------/
More information about the Python-list
mailing list