1

Our product has a file that was not versions properly deleted from the server (ftp crash). Thing is, the cloud processes are running, and I can actually submit python jobs to them (we have a process management framework.)

Is there anyway to get the code from an in-memory module? If so, I can run that code and recover the file.

Is this even possible?

user1949902
  • 361
  • 3
  • 9
  • You could most likely save data and class objects, but not the entire code that I'm aware of. You could use [pickle](https://docs.python.org/3/library/pickle.html#examples) to dump classes and functions(?). And you could use [json](https://docs.python.org/3/library/json.html) to dump variables that contain valuable information. – Torxed Feb 27 '19 at 19:21
  • [Getting the source code of a running Python script externally](https://stackoverflow.com/q/38531085/2823755) ... no accepted answer. – wwii Feb 27 '19 at 19:52

0 Answers0