store results varibles in python

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • natachai
    New Member
    • Jan 2010
    • 6

    store results varibles in python

    I am running a tree algorithms in python and it is now sucessfully give me results which are "tree structure variables which is an object type" and "scoring variables which is an decimal (ex. x = Decimal('0.123' )).

    Now, I am looking for the way that I can store these result variables. So, next time I don't have to run the model over and over again. what would be the way that I can store these variables and reuse it later next time.

    Thank you in advance though
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    Look at the pickle and cpickle modules. There are certain limitations regarding the serialization of class instances.
    Last edited by bvdet; Mar 13 '10, 09:37 PM. Reason: Mention limitations

    Comment

    • Glenton
      Recognized Expert Contributor
      • Nov 2008
      • 391

      #3
      Pickle almost always works very well. However, you can just create your own text files, if it doesn't work for you.

      Comment

      Working...