Message27760
Given the attached test.csv file, the following program
loops forever (can't even ^c):
import re
orig = open('test.csv')
file_contents = orig.read()
orig.close()
find_line = re.compile(r'^(".*")?(,(".*")?)*\n')
search_result = find_line.search(file_contents)
print search_result.span()
The corresponding tcl program works correctly:
set orig [open test.csv r]
set file_contents [read $orig]
close $orig
regexp -indices {^(".*")?(,(".*")?)*\n} $file_contents
\ indices
puts "Indices were $indices"
Both tests were run on a TP G41 running Gentoo Linux.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:38:27 | admin | link | issue1448325 messages |
2007-08-23 14:38:27 | admin | create | |
|