Re: Writing Object Data to Disk

2007-09-24 Thread Bruno Desthuilliers
David a écrit : I would like to know if Pickling the class object is the only way of writing it to disk for persistent storage. Also, do we have a concept similar to array of objects in Python? The number of objects is only known at run-time. Have a look at YAML.

Re: Writing Object Data to Disk

2007-09-23 Thread David
I would like to know if Pickling the class object is the only way of writing it to disk for persistent storage. Also, do we have a concept similar to array of objects in Python? The number of objects is only known at run-time. Have a look at YAML. http://freshmeat.net/projects/syck/ Also it

Re: [Bulk] Re: Writing Object Data to Disk

2007-09-23 Thread Amit Kumar Saha
On Sun, 2007-09-23 at 18:34 +0200, David wrote: I would like to know if Pickling the class object is the only way of writing it to disk for persistent storage. Also, do we have a concept similar to array of objects in Python? The number of objects is only known at run-time. Have a look

Re: Writing Object Data to Disk

2007-09-23 Thread Colin J. Williams
Amit Kumar Saha wrote: Actually, language independence is really not a consideration here. I am happy at having it tied to Python :-) BTW, do we have something like array of objects here? In numpy, one can have a multi-dimensional array of objects. It would be good to have this notion

Re: [Bulk] Re: Writing Object Data to Disk

2007-09-23 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Amit Kumar Saha wrote: I appreciate the XML related comment, but as of now I am ready-to-roll with Python specific pickling. XML will be used in a later version of my code! Will you need to maintain backward compatibility with data written by the current version

Writing Object Data to Disk

2007-09-22 Thread Amit Kumar Saha
Hello, I have a Python class with data members, say: class Foo: def __init__(self): self.a=7 self.b[]={1,3,4} #couple of more lists, tuples, etc I would like to know if Pickling the class object is the only way of writing

Re: Writing Object Data to Disk

2007-09-22 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Amit Kumar Saha wrote: I would like to know if Pickling the class object is the only way of writing it to disk for persistent storage. Wouldn't it be better to use a language-independent data representation that wasn't tied to Python? Also tying your external data

Re: Writing Object Data to Disk

2007-09-22 Thread Hendrik van Rooyen
Amit Kumar Saha dao.in wrote: I would like to know if Pickling the class object is the only way of writing it to disk for persistent storage. look at marshall and shelve ...Also, do we have a concept similar to array of objects in

Re: Writing Object Data to Disk

2007-09-22 Thread Bjoern Schliessmann
Amit Kumar Saha wrote: I have a Python class with data members, say: class Foo: def __init__(self): self.a=7 self.b[]={1,3,4} ^^ This is invalid syntax. I would like to know if Pickling the class object is the only way of writing it to disk for

Re: Writing Object Data to Disk

2007-09-22 Thread John Machin
On 22/09/2007 7:16 PM, Bjoern Schliessmann wrote: Amit Kumar Saha wrote: I have a Python class with data members, say: class Foo: def __init__(self): self.a=7 self.b[]={1,3,4} ^^ This is invalid syntax. So are the braces. --

Re: Re: Writing Object Data to Disk

2007-09-22 Thread Amit Kumar Saha
From: Lawrence D'Oliveiro [EMAIL PROTECTED] In message [EMAIL PROTECTED], Amit Kumar Saha wrote: I would like to know if Pickling the class object is the only way of writing it to disk for persistent storage. Wouldn't it be better to use a language-independent data

Re: Re: Writing Object Data to Disk

2007-09-22 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Amit Kumar Saha wrote: From: Lawrence D'Oliveiro [EMAIL PROTECTED] In message [EMAIL PROTECTED], Amit Kumar Saha wrote: I would like to know if Pickling the class object is the only way of writing it to disk for persistent storage. Also tying your

Re: Writing Object Data to Disk

2007-09-22 Thread Marc 'BlackJack' Rintsch
On Sat, 22 Sep 2007 17:13:14 +0530, Amit Kumar Saha wrote: BTW, do we have something like array of objects here? Like someone already said: lists. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list