pickle for PureBasic

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
bembulak
Enthusiast
Enthusiast
Posts: 572
Joined: Mon Mar 06, 2006 3:53 pm
Location: Austria

pickle for PureBasic

Post by bembulak »

Hi all!

I think it would be great, if PureBasic had some kind of a "pickle"-lib.

I discovered "pickle" (like in "mixed pickles"), when I was playing around with Python for a few weeks now. The "pickle module" has some very powerful methods to save and restore objects/lists/arrays/lists with arrays with structures/.../ very easily!

It could save a lot of time, you must not implement your own filetype (with read and write functions) and would help, if you have a quick and dirty hack.
Mapfiles (for games), Lists (as a mini-databas) and lots of other thing could be saved and restored in the correct format!

Read mor about pickle in Python:
http://www.python.org/doc/current/lib/m ... ickle.html
http://www.python.org/doc/current/lib/node318.html
http://www.python.org/doc/current/lib/p ... ample.html

Cheers,
cheers,

bembulak
Chrono Syndrome
Enthusiast
Enthusiast
Posts: 169
Joined: Thu Oct 05, 2006 6:44 am
Contact:

Post by Chrono Syndrome »

Good idea ;) .
Don't try to catch ze Night !
Remember: 'z' is better zen 'th' =) !
Sorry for bad english.
Booster698
New User
New User
Posts: 7
Joined: Wed Apr 19, 2006 10:30 pm
Location: France

Post by Booster698 »

Effectively if could be nice to handle this.
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

Really goog idea.
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Post by Rescator »

Great idea, just be aware that the stored data would be relative to the program,
compiler version and platform, and not a true file format,
trying to use it as such would make you run into MSB and LSB issues,
compiler differences and more (certain savegames of various games and
text adventures made in TADS etc spring to mind).
But as a temporary storage it would be great yeah.
Lebostein
Addict
Addict
Posts: 807
Joined: Fri Jun 11, 2004 7:07 am

Re: pickle for PureBasic

Post by Lebostein »

+1
Post Reply