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
edab328a
Commit
edab328a
authored
Dec 12, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for text (t) column type.
parent
033942a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
lib/python/Shared/DC/ZRDB/RDB.py
lib/python/Shared/DC/ZRDB/RDB.py
+16
-3
No files found.
lib/python/Shared/DC/ZRDB/RDB.py
View file @
edab328a
...
...
@@ -11,21 +11,31 @@
__doc__
=
'''Class for reading RDB files
$Id: RDB.py,v 1.
9 1997/12/05 21:27:58
jim Exp $'''
__version__
=
'$Revision: 1.
9
$'
[
11
:
-
2
]
$Id: RDB.py,v 1.
10 1997/12/12 23:38:59
jim Exp $'''
__version__
=
'$Revision: 1.
10
$'
[
11
:
-
2
]
import
regex
,
regsub
from
string
import
split
,
strip
,
lower
,
atof
,
atoi
,
atol
from
string
import
split
,
strip
,
lower
,
atof
,
atoi
,
atol
,
find
import
DateTime
from
Missing
import
MV
from
array
import
array
from
Record
import
Record
from
Acquisition
import
Implicit
def
parse_text
(
s
):
if
find
(
'
\
\
'
)
<
0
or
(
find
(
'
\
\
t'
)
<
0
and
find
(
'
\
\
n'
)
<
0
):
return
s
r
=
[]
for
x
in
split
(
s
,
'
\
\
\
\
'
):
x
=
join
(
split
(
x
,
'
\
\
n'
),
'
\
n
'
)
r
.
append
(
join
(
split
(
x
,
'
\
\
t'
),
'
\
t
'
))
return
join
(
r
,
'
\
\
'
)
Parsers
=
{
'n'
:
atof
,
'i'
:
atoi
,
'l'
:
atol
,
'd'
:
DateTime
.
DateTime
,
't'
:
parse_text
,
}
...
...
@@ -173,6 +183,9 @@ class File:
##############################################################################
#
# $Log: RDB.py,v $
# Revision 1.10 1997/12/12 23:38:59 jim
# Added support for text (t) column type.
#
# Revision 1.9 1997/12/05 21:27:58 jim
# Better brain and record-as-instance support.
#
...
...
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