473,385 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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
Mar 13 '10 #1
2 1507
bvdet
2,851 Expert Mod 2GB
Look at the pickle and cpickle modules. There are certain limitations regarding the serialization of class instances.
Mar 13 '10 #2
Glenton
391 Expert 256MB
Pickle almost always works very well. However, you can just create your own text files, if it doesn't work for you.
Mar 14 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Nicolas Lehuen | last post by:
Hi, Is it me, or does anyone else get significantly better pystone results under Cygwin versus the standard Win32 build ? CYGWIN 1.5.6 + python 2.3.3-1 : $ time python...
114
by: Maurice LING | last post by:
This may be a dumb thing to ask, but besides the penalty for dynamic typing, is there any other real reasons that Python is slower than Java? maurice
1
by: VB Programmer | last post by:
Asp.net 2.0... I have an SqlDataSource on my aspx form. It's defined as... <asp:SqlDataSource ID="sdsCoupons" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"...
1
by: VB Programmer | last post by:
I have a SqlDataSource I setup on an ASP.NET 2.0 webform. I setup the SELECT statement and it has 1 parameter, @ProductId. How do I, using VB.NET, store the results of that SELECT statement...
4
by: micahc | last post by:
I currently have a Python program that reads in emails from a POP3 server. As soon as the message is read in it is fed directly into a PostgreSQL database for storage. Later, it is broken down...
1
by: =?Utf-8?B?UGhpbA==?= | last post by:
I am using a single grid to hold different categories of data on my form. I store the data for each category in a list when the grid's Leave() function is called and restore it when the Enter is...
3
by: LisaB0212 | last post by:
I have a lovely form that I finally got done, and it is saved as an asp file. The problem is I don't know how to create a database on the server (GoDaddy hosting -- it shows options like SQL and...
5
by: chazzy69 | last post by:
Ok heres what im trying to achive i am constantly updating the information in a table but know i what know if the data im replacing it with is new, i.e. whether or not i already had the data in the...
1
by: sqlDummy | last post by:
I am a complete SQL noob, but have been left with a terrible task of rebuilding a report server where the previous admin was fired and left nothing for us. I have an ODBC connection that will...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.