*** /scratch/lib/python/Products/Squishdot/Squishdot.py Wed Jun 23 21:10:02 1999 --- Squishdot.py Sat Aug 14 20:15:06 1999 *************** *** 124,127 **** ! import sys, ts_regex, regsub from Globals import Persistent from Globals import PersistentMapping --- 124,127 ---- ! import sys, ts_regex, regsub, re from Globals import Persistent from Globals import PersistentMapping *************** *** 138,147 **** from time import time, localtime, strftime, gmtime from string import strip,split,join ! from string import lower,rfind,atoi #from creosote import spew ! CRLF=ts_regex.compile('\r\n\|\n\r') ! --- 138,147 ---- from time import time, localtime, strftime, gmtime from string import strip,split,join ! from string import lower,rfind,atoi, replace #from creosote import spew ! #CRLF=ts_regex.compile('\r\n\|\n\r') ! CRLF=re.compile('\r\n|\n\r') *************** *** 233,237 **** return id ! PATH_SEP=ts_regex.compile('[\\/]') def addFile(file, ctype): --- 233,238 ---- return id ! #PATH_SEP=ts_regex.compile('[\\/]') ! PATH_SEP=re.compile('[\\/]') def addFile(file, ctype): *************** *** 244,248 **** #spew('addf len: ' + str(len(sf._file))) f.close() ! name=strip(regsub.split(file,PATH_SEP)[-1]) sf._name = name #spew('addf name: ' + sf._name) --- 245,249 ---- #spew('addf len: ' + str(len(sf._file))) f.close() ! name=strip(PATH_SEP.split(file)[-1]) sf._name = name #spew('addf name: ' + sf._name) *************** *** 794,798 **** summary = strip(summary) if summary: ! summary =split(regsub.gsub(CRLF,'\n',summary),'\n') else: summary = None --- 804,809 ---- summary = strip(summary) if summary: ! # summary = split( replace(summary, CRLF,'\n'),'\n') ! summary =split( CRLF.sub('\n', summary),'\n') else: summary = None *************** *** 801,805 **** body = strip(body) if body: ! body =split(regsub.gsub(CRLF,'\n',body),'\n') else: body = None --- 812,817 ---- body = strip(body) if body: ! # body =split( replace(body, CRLF,'\n'),'\n') ! body =split( CRLF.sub('\n',body),'\n') else: body = None *************** *** 1229,1233 **** body =strip(body) if body: ! body =split(regsub.gsub(CRLF,'\n',body),'\n') else: body = None --- 1218,1222 ---- body =strip(body) if body: ! body =split(CRLF.sub('\n',body),'\n') else: body = None *************** *** 1324,1328 **** author = strip(author) email = strip(email) ! body = split(regsub.gsub(CRLF,'\n',body),'\n') for index in self.indices.values(): --- 1313,1317 ---- author = strip(author) email = strip(email) ! body = split(CRLF.sub('\n',body),'\n') for index in self.indices.values(): *************** *** 1380,1385 **** author=strip(author) email =strip(email) ! body =split(regsub.gsub(CRLF,'\n',body),'\n') ! summary =split(regsub.gsub(CRLF,'\n',summary),'\n') subject =strip(subject) dept =strip(dept) --- 1369,1374 ---- author=strip(author) email =strip(email) ! body =split(CRLF.sub('\n',body),'\n') ! summary =split(CRLF.sub('\n',summary),'\n') subject =strip(subject) dept =strip(dept)