Store object using Python pickle, and load it into different namespace

前端 未结 3 2002
失恋的感觉
失恋的感觉 2021-01-12 02:08

I\'d like to pass object state between two Python programs (one is my own code running standalone, one is a Pyramid view), and different namespaces. Somewhat related questio

3条回答
  •  醉酒成梦
    2021-01-12 02:50

    The easiest solution is to use cloudpickle:

    https://github.com/cloudpipe/cloudpickle

    It enabled me to easily send a pickled class file to another machine and unpickle it using cloudpickle again.

提交回复
热议问题