<p>I have a Python application in a strange state.  I don't want to do live debugging of the process.  Can I dump it to a file and examine its state later?  I know I've restored corefiles of C programs in gdb later, but I don't know how to examine a Python application in a useful way from gdb.</p>

<p>(This is a variation on my question about <a href="https://stackoverflow.com/questions/141351/how-do-i-find-what-is-using-memory-in-a-python-process-in-a-production-system">debugging memleaks in a production system</a>.)</p>

There is no builtin way other than aborting (with os.abort(), causing the coredump if resource limits allow it) -- although you can certainly build your own 'dump' function that dumps relevant information about the data you care about. There are no ready-made tools for it.
As for handling the corefile of a Python process, the
Python source has a gdbinit file
that contains useful macros. It's still a lot more painful than somehow getting into the process itself (with pdb or the interactive interpreter) but it makes life a little easier.