title: String to Object in Python
body: <p>I need to be able to convert any string representation of an object back into its original state on another computer. I will use the class, A, as my example:</p>
  
  <pre><code>    class A:
          def __init__(self):
              self.data = "test"
              self.name = "Bob"
  
          def __str__(self):
              return str(self.data) + " " + str(self.name)
  </code></pre>
  
  <p>An object of class A must be able to be recreated on a separate computer. So if a separate computer received ("A", "memberData memberName"), it could convert this into an object of class A. I need this to be possible with any user defined object. Preferably I would like the user to only have to create a toString() and toObject() method.</p>