Package gmisclib :: Module chunkio
[frames] | no frames]

Module chunkio

source code

These are I/O routines to allow you to write stuff like arrays and dictionaries (and arrays of dictionaries) to a human-readable file.

The format is normally STARTMARKER LENGTH_INFO DATA ENDMARKER, where STARTMARKER is something like "a{"}, that specifies you're at the beginning of an array. LENGTH_INFO can depend on the data type, but it's normally an integer. Then comes the data, and finally as a check, you encounter the ENDMARKER, which is normally "". All of this is recursive, of course.


Version: $Revision: 1.24 $

Classes
  BadFileFormat
  chunk
Low level file I/O operations.
  datachunk
Low level file I/O operations.
  stringchunk
Low level operations: splitting a string into chunks.
  chunk_w
  datachunk_w
This writes stuff to a file.
  chunkstring_w
This accumulates stuff in memory, and returns a string when close() is called.
Functions
 
test_e() source code
 
test() source code
Variables
  __package__ = 'gmisclib'

Imports: string, collections, numpy, g_encode