10 Nov 16:58
16 Nov 10:33
Re: how to install hachoir_editor
hi
anyone got an idea ??
cheers Luc
2011/11/10 Luc Xation <luc.xation0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
hi
i reinstalled my computer and i don't remember how i installed the library hachoir_editor without setup.py.
Any ideas welcome
cheers
Luc
22 Nov 19:08
Modification of fields
Dear all, How far from working is the code below? The idea is to change the field "x" to give it a new value, and to reconstruct the stream with this new value. https://bitbucket.org/haypo/hachoir/wiki/Ideas apparently explains that it has been envisaged. I quote: "Event driven system: allow fields to signal modify events up to parent fields, all the way to root". Regards, Louis from hachoir_core.stream import StringInputStream, LITTLE_ENDIAN from hachoir_core.field import Parser, CString, UInt16 class Point(Parser): endian = LITTLE_ENDIAN def createFields(self): yield CString(self, "name", "Point name") yield UInt16(self, "x", "X coordinate") yield UInt16(self, "y", "Y coordinate") d0 = "point\0\3\0\2\0" p0 = Point(StringInputStream(d0)) d1 = "point\0\8\0\8\0" p1 = Point(StringInputStream(d1)) p0["x"].value p0.replaceField("x",p1["x"])
RSS Feed