with open('pickled.pkl', 'wb') as f: pickle.dump(Foo, f) # 一つのファイルに複数のオブジェクトをpickle化できる pickle.dump(hello, f) Pythonが ...