Re: Restore files from Data.fs.tr0 SOLVED

"Jaroslav Lukesh" <[email protected]> Mon, 18 Mar 2013 20:36:03 +0100
Newsgroups gmane.comp.web.zope.general,gmane.comp.web.zope.zodb
Message-ID <002c01ce240f$d436beb0$80d810ac@IBMXP>
This simple script and diff and manual changes against appropriate files.

#!/var/zope/python/bin/python
f = open("Data.fs.tr0", "r+ab")
c =  f.read()
s='__name__q'
a = c.split(s)
i = 0
print(len(a))
for polozka in a:
    i = i + 1
    fn = 'vystup_' + str(i)
    x = open(fn,"ab")
    x.write(polozka)
    x.close()
f.close()

Lucky that it was no much of filenames. Select both files in Total 
Commander, then File - Diff - uncheck binary and check again - Edit, helps a 
lot.

For bigger truncated slices it could be better to do it with filename 
support etc.

Regards, JL. 

_______________________________________________
Zope maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )