Commits

Victor Stinner committed 888d9cf

Comments (0)

Files changed (1)

hachoir-editor.wiki

 
 {{{
 #!python
+from hachoir_parser import createParser
 from hachoir_editor import createEditor
 from hachoir_core.field import writeIntoFile
 
-editor = createEditor(u"file.gz")
+parser = createParser(u"file.gz")
+editor = createEditor(parser)
 del editor["filename"]
 editor["has_filename"].value = False
 writeIntoFile(editor, u"noname.gz")
 
 {{{
 #!python
+from hachoir_parser import createParser
 from hachoir_editor import createEditor
 from hachoir_core.field import writeIntoFile
 from hachoir_core.editor import EditableInteger, EditableBytes
 
-editor = createEditor(u"file.gz")
+parser = createParser(u"file.gz")
+editor = createEditor(parser)
 extra = "abcd"
 editor["has_extra"].value = True
 editor.insertAfter("os",
 
 {{{
 #!python
+from hachoir_parser import createParser
 from hachoir_editor import createEditor
 from hachoir_core.field import writeIntoFile
 
-editor = createEditor(u"file.zip")
+parser = createParser(u"file.gz")
+editor = createEditor(parser)
 editor["end_central_directory/comment"].value = "new comment"
 writeIntoFile(editor, u"file_comment.zip")
 }}}