(Aug-08-2020, 07:17 PM)ndc85430 Wrote: What? I'm not really understanding why you want to store the object as a string. Can't you use the pickle module?
Thank you, but I cannot use the pickle module because there is an error message "TypeError: can't pickle PyCapsule objects". What I did is as below:
import pickle class CLASS: ... def Func(): p = pickle.dumps(self.drawHandler) # I'm trying to pickle a function handler. ... unpickle = pickle.loads(p)I give up on this method, the next method is how to make the kind of global static object? I don't know if it's an off-topic if I ask it here, but I will Google it now.