[issue23933] Struct module should acept arrays

2015-04-13 Thread Wolfgang Maier
Changes by Wolfgang Maier wolfgang.ma...@biologie.uni-freiburg.de: -- nosy: -wolma ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23933 ___ ___

[issue23933] Struct module should acept arrays

2015-04-13 Thread Wolfgang Maier
Wolfgang Maier added the comment: I'm afraid you lost me and I do not see what your problem is here. Maybe you should raise this on one of the Python mailing lists (see https://www.python.org/community/lists/) ? -- ___ Python tracker

[issue23933] Struct module should acept arrays

2015-04-13 Thread Anderson
New submission from Anderson: Correct me if I'm wrong, the struct module does not work with array of ints, floats etc (just work with char in the form of strings). I think it should since this are valid elements in C structs. More specifically, consider I have this C struct struct{ int

[issue23933] Struct module should acept arrays

2015-04-13 Thread Anderson
Anderson added the comment: @wolma, That would work in this simple example. But in a more complicated case this became inconvenient. Actually I'm working with reading and writing in python an extremely C-oriented file-type (MDV). For that I represent C-structs as python dics (e.q

[issue23933] Struct module should acept arrays

2015-04-13 Thread Wolfgang Maier
Wolfgang Maier added the comment: are you looking for: struct.pack('i'*4, *[0]*4) ? -- nosy: +wolma ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23933 ___