On Fri, May 1, 2009 at 8:06 AM, Evgueni Kolossov <[email protected]> wrote: > Thank you very much Greg, > > Couple of more things to clarify: > - in documentation you have mentioned pickle files. Can you please > give an example read/write for this kind of files;
The documentation is primarily focused on python. Python has it's own method for serializing (pickling) objects. From C++ I never really did too much with writing to/reading from binary files. I guess one could just write the binary data directly to the stream and read it back the same way, but this doesn't answer your next question: > - in SDF the records separated by quite definite sequence which allow > us to create an index file and have direct access to particular record > number. Is it possible with pickle files? If you create your own convention for how you write the files, sure. Otherwise you have to just build files and then write out the result of an fget after each read is finished. On reading you can seek to the relevant position and then start reading. It probably would be useful to have a standardized binary format for reading from C++ (or python), but I have never had the pressing need; so it hasn't happened. -greg

