Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
arpeggio-gm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
backend
arpeggio-gm
Commits
2e888150
Commit
2e888150
authored
Jan 25, 2014
by
Igor Dejanovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix in the CSV top rule.
parent
28bc3ad7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
csv.py
examples/csv.py
+2
-2
No files found.
examples/csv.py
View file @
2e888150
...
...
@@ -15,7 +15,7 @@ def field(): return [quoted_field, field_content]
def
quoted_field
():
return
'"'
,
field_content_quoted
,
'"'
def
field_content
():
return
_
(
r'([^,\n])+'
)
def
field_content_quoted
():
return
_
(
r'(("")|([^"]))+'
)
def
csvfile
():
return
OneOrMore
(
ZeroOrMore
(
newline
),
record
,
OneOrMore
(
newline
)
),
EndOfFile
def
csvfile
():
return
OneOrMore
(
[
record
,
newline
]
),
EndOfFile
if
__name__
==
"__main__"
:
...
...
@@ -23,7 +23,7 @@ if __name__ == "__main__":
test_data
=
'''
Unquoted test, "Quoted test", 23234, One Two Three, "343456.45"
Unquoted test 2, "Quoted test
2
", 23234, One Two Three, "343456.45"
Unquoted test 2, "Quoted test
with ""inner"" quotes
", 23234, One Two Three, "343456.45"
Unquoted test 3, "Quoted test 3", 23234, One Two Three, "343456.45"
'''
...
...
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