version 1.65, 2007/02/08 10:46:36
|
version 1.66, 2007/02/08 12:00:23
|
Line 25 from BTrees.OOBTree import OOBTree
|
Line 25 from BTrees.OOBTree import OOBTree
|
import logging |
import logging |
import transaction |
import transaction |
import copy |
import copy |
|
import codecs |
|
|
def unique(s): |
def unique(s): |
"""Return a list of the elements in s, but without duplicates. |
"""Return a list of the elements in s, but without duplicates. |
Line 1449 def splitatf(fh,dir=None,ext=None):
|
Line 1450 def splitatf(fh,dir=None,ext=None):
|
i=0 |
i=0 |
|
|
for lineTmp in fh.readlines(): |
for lineTmp in fh.readlines(): |
|
lineTmp=lineTmp.replace(codecs.BOM_UTF8,'') # make sure that all BOM are removed.. |
for line in lineTmp.split("\r"): |
for line in lineTmp.split("\r"): |
|
#logging.log("Deal with: %s"%line) |
if ext: |
if ext: |
i+=1 |
i+=1 |
if (i%100)==0: |
if (i%100)==0: |