[Numpy-discussion] pep-3118 extended struct format parser

Sebastien Binet seb.binet at gmail.com
Thu Jul 2 04:12:37 EDT 2009


hi there,

at last scipy'08 sprint, somebody (apologies for my brain fade) was working on 
being able to parse the extended struct format string so one could do:
 
Nested structure
    ::

        struct {
             int ival;
             struct {
                 unsigned short sval;
                 unsigned char bval;
                 unsigned char cval;
             } sub;
        }
        """i:ival: 
           T{
              H:sval: 
              B:bval: 
              B:cval:
            }:sub:
        """
Nested array
    ::

        struct {
             int ival;
             double data[16*4];
        }
        """i:ival: 
           (16,4)d:data:
        """

is this available somewhere ?
(being it in pure python or fast-C implemented, I don't really care for the 
moment :) )

cheers,
sebastien.
-- 
#########################################
# Dr. Sebastien Binet
# Laboratoire de l'Accelerateur Lineaire
# Universite Paris-Sud XI
# Batiment 200
# 91898 Orsay
#########################################




More information about the NumPy-Discussion mailing list