>b's weblog

News. Journal. Whatever.

Uno-Alarm: In Afrika drohen 20 Millionen Menschen zu verhungernGATTACA: US Congress winkt Gesetz durch, dass es Arbeitgebern erlaubt, Gentests von ihren Mitarbeitern zu fordern

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Die Methode gibt's hier.