Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
d3fba728
Commit
d3fba728
authored
Jul 14, 1999
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for converting export files.
parent
f32aad39
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
utilities/FS.py
utilities/FS.py
+34
-0
No files found.
utilities/FS.py
View file @
d3fba728
...
...
@@ -207,6 +207,40 @@ class FS:
del
tindex
[:]
class
ZEXP
:
"""Zope Export format 'report' writer
"""
def
__init__
(
self
,
fname
,
file
):
file
.
seek
(
0
,
2
)
self
.
_input_size
=
file
.
tell
()
file
.
seek
(
0
)
self
.
__name__
=
fname
self
.
_file
=
open
(
fname
,
'w+b'
)
self
.
_file
.
write
(
'ZEXP'
)
self
.
_pos
=
4
self
.
_progress
=
None
def
rpt
(
self
,
pos
,
oid
,
start
,
tname
,
user
,
t
,
p
,
first
,
newtrans
):
write
=
self
.
_file
.
write
if
pos
is
None
:
write
(
'
\
377
'
*
16
)
# end marker
sys
.
stderr
.
write
(
' %% 100
\
n
'
)
return
else
:
progress
=
' %% %.1f
\
r
'
%
(
pos
*
100.0
/
self
.
_input_size
)
if
progress
!=
self
.
_progress
:
sys
.
stderr
.
write
(
progress
)
self
.
_progress
=
progress
data
=
fixpickle
(
p
,
oid
)
l
=
len
(
data
)
write
(
p64
(
oid
+
1
)
+
p64
(
l
))
write
(
data
)
self
.
_pos
=
self
.
_pos
+
l
+
16
t32
=
1L
<<
32
def
p64
(
v
,
pack
=
struct
.
pack
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment