update to 3.1.3
changes: misc fixes and improvements
This commit is contained in:
parent
a522f77913
commit
b9ba6a6e11
4 changed files with 117 additions and 157 deletions
|
@ -1,9 +1,8 @@
|
|||
# $NetBSD: Makefile,v 1.29 2009/05/30 01:01:41 zafer Exp $
|
||||
# $NetBSD: Makefile,v 1.30 2011/01/11 11:59:19 drochner Exp $
|
||||
#
|
||||
|
||||
DISTNAME= egenix-mx-base-2.0.6
|
||||
PKGNAME= ${PYPKGPREFIX}-mxDateTime-2.0.6
|
||||
PKGREVISION= 1
|
||||
DISTNAME= egenix-mx-base-3.1.3
|
||||
PKGNAME= ${PYPKGPREFIX}-mxDateTime-3.1.3
|
||||
CATEGORIES= time python
|
||||
MASTER_SITES= http://downloads.egenix.com/python/
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@comment $NetBSD: PLIST,v 1.4 2009/06/14 18:18:00 joerg Exp $
|
||||
@comment $NetBSD: PLIST,v 1.5 2011/01/11 11:59:19 drochner Exp $
|
||||
${PYSITELIB}/mx/BeeBase/BeeBase.py
|
||||
${PYSITELIB}/mx/BeeBase/BeeBase.pyc
|
||||
${PYSITELIB}/mx/BeeBase/BeeBase.pyo
|
||||
|
@ -15,8 +15,7 @@ ${PYSITELIB}/mx/BeeBase/COPYRIGHT
|
|||
${PYSITELIB}/mx/BeeBase/Cache.py
|
||||
${PYSITELIB}/mx/BeeBase/Cache.pyc
|
||||
${PYSITELIB}/mx/BeeBase/Cache.pyo
|
||||
${PYSITELIB}/mx/BeeBase/Doc/mxBeeBase.html
|
||||
${PYSITELIB}/mx/BeeBase/Doc/mxLicense.html
|
||||
${PYSITELIB}/mx/BeeBase/Doc/mxBeeBase.pdf
|
||||
${PYSITELIB}/mx/BeeBase/ExitFunctions.py
|
||||
${PYSITELIB}/mx/BeeBase/ExitFunctions.pyc
|
||||
${PYSITELIB}/mx/BeeBase/ExitFunctions.pyo
|
||||
|
@ -38,6 +37,12 @@ ${PYSITELIB}/mx/BeeBase/mxBeeBase/mxh.h
|
|||
${PYSITELIB}/mx/BeeBase/mxBeeBase/test.py
|
||||
${PYSITELIB}/mx/BeeBase/mxBeeBase/test.pyc
|
||||
${PYSITELIB}/mx/BeeBase/mxBeeBase/test.pyo
|
||||
${PYSITELIB}/mx/BeeBase/mxBeeBase/testernesto.py
|
||||
${PYSITELIB}/mx/BeeBase/mxBeeBase/testernesto.pyc
|
||||
${PYSITELIB}/mx/BeeBase/mxBeeBase/testernesto.pyo
|
||||
${PYSITELIB}/mx/BeeBase/mxBeeBase/testjohn.py
|
||||
${PYSITELIB}/mx/BeeBase/mxBeeBase/testjohn.pyc
|
||||
${PYSITELIB}/mx/BeeBase/mxBeeBase/testjohn.pyo
|
||||
${PYSITELIB}/mx/BeeBase/showBeeDict.py
|
||||
${PYSITELIB}/mx/BeeBase/showBeeDict.pyc
|
||||
${PYSITELIB}/mx/BeeBase/showBeeDict.pyo
|
||||
|
@ -49,9 +54,7 @@ ${PYSITELIB}/mx/DateTime/COPYRIGHT
|
|||
${PYSITELIB}/mx/DateTime/DateTime.py
|
||||
${PYSITELIB}/mx/DateTime/DateTime.pyc
|
||||
${PYSITELIB}/mx/DateTime/DateTime.pyo
|
||||
${PYSITELIB}/mx/DateTime/Doc/mxDateTime-History.html
|
||||
${PYSITELIB}/mx/DateTime/Doc/mxDateTime.html
|
||||
${PYSITELIB}/mx/DateTime/Doc/mxLicense.html
|
||||
${PYSITELIB}/mx/DateTime/Doc/mxDateTime.pdf
|
||||
${PYSITELIB}/mx/DateTime/Examples/AtomicClock.py
|
||||
${PYSITELIB}/mx/DateTime/Examples/AtomicClock.pyc
|
||||
${PYSITELIB}/mx/DateTime/Examples/AtomicClock.pyo
|
||||
|
@ -117,12 +120,24 @@ ${PYSITELIB}/mx/DateTime/mxDateTime/test.pyo
|
|||
${PYSITELIB}/mx/DateTime/mxDateTime/testcmp.py
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testcmp.pyc
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testcmp.pyo
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testcoerce.py
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testcoerce.pyc
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testcoerce.pyo
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testcomdates.py
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testcomdates.pyc
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testcomdates.pyo
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testnow.py
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testnow.pyc
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testnow.pyo
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testpydatetime.py
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testpydatetime.pyc
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testpydatetime.pyo
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testrichard.py
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testrichard.pyc
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testrichard.pyo
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testroundoff.py
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testroundoff.pyc
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/testroundoff.pyo
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/teststrftime.py
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/teststrftime.pyc
|
||||
${PYSITELIB}/mx/DateTime/mxDateTime/teststrftime.pyo
|
||||
|
@ -136,18 +151,23 @@ ${PYSITELIB}/mx/DateTime/timegm.py
|
|||
${PYSITELIB}/mx/DateTime/timegm.pyc
|
||||
${PYSITELIB}/mx/DateTime/timegm.pyo
|
||||
${PYSITELIB}/mx/Doc/eGenix-mx-Extensions.html
|
||||
${PYSITELIB}/mx/Doc/mxBeeBase.html
|
||||
${PYSITELIB}/mx/Doc/mxDateTime.html
|
||||
${PYSITELIB}/mx/Doc/mxLicense.html
|
||||
${PYSITELIB}/mx/Doc/mxProxy.html
|
||||
${PYSITELIB}/mx/Doc/mxQueue.html
|
||||
${PYSITELIB}/mx/Doc/mxStack.html
|
||||
${PYSITELIB}/mx/Doc/mxTextTools.html
|
||||
${PYSITELIB}/mx/Doc/mxTools.html
|
||||
${PYSITELIB}/mx/Doc/mxBeeBase.pdf
|
||||
${PYSITELIB}/mx/Doc/mxDateTime.pdf
|
||||
${PYSITELIB}/mx/Doc/mxProxy.pdf
|
||||
${PYSITELIB}/mx/Doc/mxQueue.pdf
|
||||
${PYSITELIB}/mx/Doc/mxStack.pdf
|
||||
${PYSITELIB}/mx/Doc/mxTextTools.pdf
|
||||
${PYSITELIB}/mx/Doc/mxTools.pdf
|
||||
${PYSITELIB}/mx/Doc/mxUID.pdf
|
||||
${PYSITELIB}/mx/Doc/mxURL.pdf
|
||||
${PYSITELIB}/mx/LICENSE
|
||||
${PYSITELIB}/mx/Log.py
|
||||
${PYSITELIB}/mx/Log.pyc
|
||||
${PYSITELIB}/mx/Log.pyo
|
||||
${PYSITELIB}/mx/Misc/COPYRIGHT
|
||||
${PYSITELIB}/mx/Misc/CSV.py
|
||||
${PYSITELIB}/mx/Misc/CSV.pyc
|
||||
${PYSITELIB}/mx/Misc/CSV.pyo
|
||||
${PYSITELIB}/mx/Misc/Cache.py
|
||||
${PYSITELIB}/mx/Misc/Cache.pyc
|
||||
${PYSITELIB}/mx/Misc/Cache.pyo
|
||||
|
@ -160,9 +180,13 @@ ${PYSITELIB}/mx/Misc/ConfigFile.pyo
|
|||
${PYSITELIB}/mx/Misc/Cookie.py
|
||||
${PYSITELIB}/mx/Misc/Cookie.pyc
|
||||
${PYSITELIB}/mx/Misc/Cookie.pyo
|
||||
${PYSITELIB}/mx/Misc/ExitFunctions.py
|
||||
${PYSITELIB}/mx/Misc/ExitFunctions.pyc
|
||||
${PYSITELIB}/mx/Misc/ExitFunctions.pyo
|
||||
${PYSITELIB}/mx/Misc/FileLock.py
|
||||
${PYSITELIB}/mx/Misc/FileLock.pyc
|
||||
${PYSITELIB}/mx/Misc/FileLock.pyo
|
||||
${PYSITELIB}/mx/Misc/LICENSE
|
||||
${PYSITELIB}/mx/Misc/LazyModule.py
|
||||
${PYSITELIB}/mx/Misc/LazyModule.pyc
|
||||
${PYSITELIB}/mx/Misc/LazyModule.pyo
|
||||
|
@ -182,8 +206,7 @@ ${PYSITELIB}/mx/NewBuiltins.py
|
|||
${PYSITELIB}/mx/NewBuiltins.pyc
|
||||
${PYSITELIB}/mx/NewBuiltins.pyo
|
||||
${PYSITELIB}/mx/Proxy/COPYRIGHT
|
||||
${PYSITELIB}/mx/Proxy/Doc/mxLicense.html
|
||||
${PYSITELIB}/mx/Proxy/Doc/mxProxy.html
|
||||
${PYSITELIB}/mx/Proxy/Doc/mxProxy.pdf
|
||||
${PYSITELIB}/mx/Proxy/LICENSE
|
||||
${PYSITELIB}/mx/Proxy/Proxy.py
|
||||
${PYSITELIB}/mx/Proxy/Proxy.pyc
|
||||
|
@ -208,10 +231,12 @@ ${PYSITELIB}/mx/Proxy/mxProxy/weakreftest.py
|
|||
${PYSITELIB}/mx/Proxy/mxProxy/weakreftest.pyc
|
||||
${PYSITELIB}/mx/Proxy/mxProxy/weakreftest.pyo
|
||||
${PYSITELIB}/mx/Queue/COPYRIGHT
|
||||
${PYSITELIB}/mx/Queue/Doc/mxLicense.html
|
||||
${PYSITELIB}/mx/Queue/Doc/mxQueue.html
|
||||
${PYSITELIB}/mx/Queue/Doc/mxQueue.pdf
|
||||
${PYSITELIB}/mx/Queue/LICENSE
|
||||
${PYSITELIB}/mx/Queue/README
|
||||
${PYSITELIB}/mx/Queue/UserQueue.py
|
||||
${PYSITELIB}/mx/Queue/UserQueue.pyc
|
||||
${PYSITELIB}/mx/Queue/UserQueue.pyo
|
||||
${PYSITELIB}/mx/Queue/__init__.py
|
||||
${PYSITELIB}/mx/Queue/__init__.pyc
|
||||
${PYSITELIB}/mx/Queue/__init__.pyo
|
||||
|
@ -227,6 +252,10 @@ ${PYSITELIB}/mx/Queue/mxQueue/test.pyo
|
|||
${PYSITELIB}/mx/Queue/queuebench.py
|
||||
${PYSITELIB}/mx/Queue/queuebench.pyc
|
||||
${PYSITELIB}/mx/Queue/queuebench.pyo
|
||||
${PYSITELIB}/mx/Stack/COPYRIGHT
|
||||
${PYSITELIB}/mx/Stack/Doc/mxStack.pdf
|
||||
${PYSITELIB}/mx/Stack/LICENSE
|
||||
${PYSITELIB}/mx/Stack/README
|
||||
${PYSITELIB}/mx/Stack/UserStack.py
|
||||
${PYSITELIB}/mx/Stack/UserStack.pyc
|
||||
${PYSITELIB}/mx/Stack/UserStack.pyo
|
||||
|
@ -236,7 +265,9 @@ ${PYSITELIB}/mx/Stack/__init__.pyo
|
|||
${PYSITELIB}/mx/Stack/mxStack/__init__.py
|
||||
${PYSITELIB}/mx/Stack/mxStack/__init__.pyc
|
||||
${PYSITELIB}/mx/Stack/mxStack/__init__.pyo
|
||||
${PYSITELIB}/mx/Stack/mxStack/mxStack.h
|
||||
${PYSITELIB}/mx/Stack/mxStack/mxStack.so
|
||||
${PYSITELIB}/mx/Stack/mxStack/mxh.h
|
||||
${PYSITELIB}/mx/Stack/mxStack/test.py
|
||||
${PYSITELIB}/mx/Stack/mxStack/test.pyc
|
||||
${PYSITELIB}/mx/Stack/mxStack/test.pyo
|
||||
|
@ -253,8 +284,7 @@ ${PYSITELIB}/mx/TextTools/Constants/TagTables.pyo
|
|||
${PYSITELIB}/mx/TextTools/Constants/__init__.py
|
||||
${PYSITELIB}/mx/TextTools/Constants/__init__.pyc
|
||||
${PYSITELIB}/mx/TextTools/Constants/__init__.pyo
|
||||
${PYSITELIB}/mx/TextTools/Doc/mxLicense.html
|
||||
${PYSITELIB}/mx/TextTools/Doc/mxTextTools.html
|
||||
${PYSITELIB}/mx/TextTools/Doc/mxTextTools.pdf
|
||||
${PYSITELIB}/mx/TextTools/Examples/HTML.py
|
||||
${PYSITELIB}/mx/TextTools/Examples/HTML.pyc
|
||||
${PYSITELIB}/mx/TextTools/Examples/HTML.pyo
|
||||
|
@ -303,13 +333,23 @@ ${PYSITELIB}/mx/TextTools/mxTextTools/mxTextTools.h
|
|||
${PYSITELIB}/mx/TextTools/mxTextTools/mxTextTools.so
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/mxbmse.h
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/mxh.h
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/mxte.h
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/test.py
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/test.pyc
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/test.pyo
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/testHTML.py
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/testHTML.pyc
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/testHTML.pyo
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/testPickleSegFault.py
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/testPickleSegFault.pyc
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/testPickleSegFault.pyo
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/testSegFault.py
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/testSegFault.pyc
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/testSegFault.pyo
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/testkj.py
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/testkj.pyc
|
||||
${PYSITELIB}/mx/TextTools/mxTextTools/testkj.pyo
|
||||
${PYSITELIB}/mx/Tools/COPYRIGHT
|
||||
${PYSITELIB}/mx/Tools/Doc/mxLicense.html
|
||||
${PYSITELIB}/mx/Tools/Doc/mxTools.html
|
||||
${PYSITELIB}/mx/Tools/Doc/mxTools.pdf
|
||||
${PYSITELIB}/mx/Tools/Examples/Acquisition.py
|
||||
${PYSITELIB}/mx/Tools/Examples/Acquisition.pyc
|
||||
${PYSITELIB}/mx/Tools/Examples/Acquisition.pyo
|
||||
|
@ -345,7 +385,53 @@ ${PYSITELIB}/mx/Tools/mxTools/mxh.h
|
|||
${PYSITELIB}/mx/Tools/mxTools/test.py
|
||||
${PYSITELIB}/mx/Tools/mxTools/test.pyc
|
||||
${PYSITELIB}/mx/Tools/mxTools/test.pyo
|
||||
${PYSITELIB}/mx/Tools/mxTools/xmap.so
|
||||
${PYSITELIB}/mx/Tools/mxTools/test_safecall.py
|
||||
${PYSITELIB}/mx/Tools/mxTools/test_safecall.pyc
|
||||
${PYSITELIB}/mx/Tools/mxTools/test_safecall.pyo
|
||||
${PYSITELIB}/mx/UID/COPYRIGHT
|
||||
${PYSITELIB}/mx/UID/Doc/mxUID.pdf
|
||||
${PYSITELIB}/mx/UID/LICENSE
|
||||
${PYSITELIB}/mx/UID/README
|
||||
${PYSITELIB}/mx/UID/UID.py
|
||||
${PYSITELIB}/mx/UID/UID.pyc
|
||||
${PYSITELIB}/mx/UID/UID.pyo
|
||||
${PYSITELIB}/mx/UID/__init__.py
|
||||
${PYSITELIB}/mx/UID/__init__.pyc
|
||||
${PYSITELIB}/mx/UID/__init__.pyo
|
||||
${PYSITELIB}/mx/UID/mxUID/__init__.py
|
||||
${PYSITELIB}/mx/UID/mxUID/__init__.pyc
|
||||
${PYSITELIB}/mx/UID/mxUID/__init__.pyo
|
||||
${PYSITELIB}/mx/UID/mxUID/mxUID.h
|
||||
${PYSITELIB}/mx/UID/mxUID/mxUID.so
|
||||
${PYSITELIB}/mx/UID/mxUID/mxh.h
|
||||
${PYSITELIB}/mx/UID/mxUID/test.py
|
||||
${PYSITELIB}/mx/UID/mxUID/test.pyc
|
||||
${PYSITELIB}/mx/UID/mxUID/test.pyo
|
||||
${PYSITELIB}/mx/URL/COPYRIGHT
|
||||
${PYSITELIB}/mx/URL/Doc/mxURL.pdf
|
||||
${PYSITELIB}/mx/URL/LICENSE
|
||||
${PYSITELIB}/mx/URL/LazyModule.py
|
||||
${PYSITELIB}/mx/URL/LazyModule.pyc
|
||||
${PYSITELIB}/mx/URL/LazyModule.pyo
|
||||
${PYSITELIB}/mx/URL/Listing.py
|
||||
${PYSITELIB}/mx/URL/Listing.pyc
|
||||
${PYSITELIB}/mx/URL/Listing.pyo
|
||||
${PYSITELIB}/mx/URL/README
|
||||
${PYSITELIB}/mx/URL/URL.py
|
||||
${PYSITELIB}/mx/URL/URL.pyc
|
||||
${PYSITELIB}/mx/URL/URL.pyo
|
||||
${PYSITELIB}/mx/URL/__init__.py
|
||||
${PYSITELIB}/mx/URL/__init__.pyc
|
||||
${PYSITELIB}/mx/URL/__init__.pyo
|
||||
${PYSITELIB}/mx/URL/mxURL/__init__.py
|
||||
${PYSITELIB}/mx/URL/mxURL/__init__.pyc
|
||||
${PYSITELIB}/mx/URL/mxURL/__init__.pyo
|
||||
${PYSITELIB}/mx/URL/mxURL/mxURL.h
|
||||
${PYSITELIB}/mx/URL/mxURL/mxURL.so
|
||||
${PYSITELIB}/mx/URL/mxURL/mxh.h
|
||||
${PYSITELIB}/mx/URL/mxURL/test.py
|
||||
${PYSITELIB}/mx/URL/mxURL/test.pyc
|
||||
${PYSITELIB}/mx/URL/mxURL/test.pyo
|
||||
${PYSITELIB}/mx/__init__.py
|
||||
${PYSITELIB}/mx/__init__.pyc
|
||||
${PYSITELIB}/mx/__init__.pyo
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
$NetBSD: distinfo,v 1.8 2009/07/06 21:42:38 joerg Exp $
|
||||
$NetBSD: distinfo,v 1.9 2011/01/11 11:59:19 drochner Exp $
|
||||
|
||||
SHA1 (egenix-mx-base-2.0.6.tar.gz) = 7f964408e3bd907c1a39b0f8d8d00d2367d97841
|
||||
RMD160 (egenix-mx-base-2.0.6.tar.gz) = dc25b5941cb790d1aa424a7eb1849ddf7231fa0e
|
||||
Size (egenix-mx-base-2.0.6.tar.gz) = 586854 bytes
|
||||
SHA1 (patch-aa) = 4d35beff0cef676a2c5bb28d379d36e29a94aaec
|
||||
SHA1 (egenix-mx-base-3.1.3.tar.gz) = 4bedefb9a698bad754b8847ab6432e77d1c58227
|
||||
RMD160 (egenix-mx-base-3.1.3.tar.gz) = 1629f25e4113493766bb0696856543dc7096c347
|
||||
Size (egenix-mx-base-3.1.3.tar.gz) = 8170718 bytes
|
||||
|
|
|
@ -1,124 +0,0 @@
|
|||
$NetBSD: patch-aa,v 1.3 2009/07/06 21:42:38 joerg Exp $
|
||||
|
||||
--- mx/TextTools/TextTools.py.orig 2009-07-06 21:37:44.000000000 +0000
|
||||
+++ mx/TextTools/TextTools.py
|
||||
@@ -167,7 +167,7 @@ def word_in_list(l):
|
||||
# Extra stuff useful in combination with the C functions
|
||||
#
|
||||
|
||||
-def replace(text,what,with,start=0,stop=None,
|
||||
+def replace(text,what,with_,start=0,stop=None,
|
||||
|
||||
SearchObject=BMS,join=join,joinlist=joinlist,tag=tag,
|
||||
string_replace=string.replace,type=type,
|
||||
@@ -188,11 +188,11 @@ def replace(text,what,with,start=0,stop=
|
||||
what = so.match
|
||||
if stop is None:
|
||||
if start == 0 and len(what) < 2:
|
||||
- return string_replace(text,what,with)
|
||||
+ return string_replace(text,what,with_)
|
||||
stop = len(text)
|
||||
t = ((text,sWordStart,so,+2),
|
||||
# Found something, replace and continue searching
|
||||
- (with,Skip+AppendTagobj,len(what),-1,-1),
|
||||
+ (with_,Skip+AppendTagobj,len(what),-1,-1),
|
||||
# Rest of text
|
||||
(text,Move,ToEOF)
|
||||
)
|
||||
@@ -203,7 +203,7 @@ def replace(text,what,with,start=0,stop=
|
||||
|
||||
# Alternative (usually slower) versions using different techniques:
|
||||
|
||||
-def _replace2(text,what,with,start=0,stop=None,
|
||||
+def _replace2(text,what,with_,start=0,stop=None,
|
||||
|
||||
join=join,joinlist=joinlist,tag=tag,
|
||||
StringType=types.StringType,BMS=BMS):
|
||||
@@ -222,13 +222,13 @@ def _replace2(text,what,with,start=0,sto
|
||||
stop = len(text)
|
||||
if type(what) == StringType:
|
||||
what=BMS(what)
|
||||
- t = ((with,sFindWord,what,+1,+0),)
|
||||
+ t = ((with_,sFindWord,what,+1,+0),)
|
||||
found,taglist,last = tag(text,t,start,stop)
|
||||
if not found:
|
||||
return text
|
||||
return join(joinlist(text,taglist))
|
||||
|
||||
-def _replace3(text,what,with,
|
||||
+def _replace3(text,what,with_,
|
||||
|
||||
join=string.join,FS=FS,
|
||||
StringType=types.StringType):
|
||||
@@ -241,12 +241,12 @@ def _replace3(text,what,with,
|
||||
l = []
|
||||
x = 0
|
||||
for left,right in slices:
|
||||
- l.append(text[x:left] + with)
|
||||
+ l.append(text[x:left] + with_)
|
||||
x = right
|
||||
l.append(text[x:])
|
||||
return join(l,'')
|
||||
|
||||
-def _replace4(text,what,with,
|
||||
+def _replace4(text,what,with_,
|
||||
|
||||
join=join,joinlist=joinlist,tag=tag,FS=FS,
|
||||
StringType=types.StringType):
|
||||
@@ -258,7 +258,7 @@ def _replace4(text,what,with,
|
||||
return text
|
||||
repl = [None]*len(slices)
|
||||
for i in range(len(slices)):
|
||||
- repl[i] = (with,)+slices[i]
|
||||
+ repl[i] = (with_,)+slices[i]
|
||||
return join(joinlist(text,repl))
|
||||
|
||||
def multireplace(text,replacements,start=0,stop=None,
|
||||
@@ -554,16 +554,16 @@ def _bench(file='mxTextTools/mxTextTools
|
||||
print 'Replacing strings'
|
||||
print '-'*72
|
||||
print
|
||||
- for what,with in (('m','M'),('mx','MX'),('mxText','MXTEXT'),
|
||||
+ for what,with_ in (('m','M'),('mx','MX'),('mxText','MXTEXT'),
|
||||
('hmm','HMM'),('hmmm','HMM'),('hmhmm','HMM')):
|
||||
- print 'Replace "%s" with "%s"' % (what,with)
|
||||
+ print 'Replace "%s" with "%s"' % (what,with_)
|
||||
t.start()
|
||||
for i in range(100):
|
||||
- rtext = string.replace(text,what,with)
|
||||
+ rtext = string.replace(text,what,with_)
|
||||
print 'with string.replace:',t.stop(),'sec.'
|
||||
t.start()
|
||||
for i in range(100):
|
||||
- ttext = replace(text,what,with)
|
||||
+ ttext = replace(text,what,with_)
|
||||
print 'with tag.replace:',t.stop(),'sec.'
|
||||
if ttext != rtext:
|
||||
print 'results are NOT ok !'
|
||||
@@ -571,7 +571,7 @@ def _bench(file='mxTextTools/mxTextTools
|
||||
mismatch(rtext,ttext)
|
||||
t.start()
|
||||
for i in range(100):
|
||||
- ttext = _replace2(text,what,with)
|
||||
+ ttext = _replace2(text,what,with_)
|
||||
print 'with tag._replace2:',t.stop(),'sec.'
|
||||
if ttext != rtext:
|
||||
print 'results are NOT ok !'
|
||||
@@ -579,7 +579,7 @@ def _bench(file='mxTextTools/mxTextTools
|
||||
print rtext
|
||||
t.start()
|
||||
for i in range(100):
|
||||
- ttext = _replace3(text,what,with)
|
||||
+ ttext = _replace3(text,what,with_)
|
||||
print 'with tag._replace3:',t.stop(),'sec.'
|
||||
if ttext != rtext:
|
||||
print 'results are NOT ok !'
|
||||
@@ -587,7 +587,7 @@ def _bench(file='mxTextTools/mxTextTools
|
||||
print rtext
|
||||
t.start()
|
||||
for i in range(100):
|
||||
- ttext = _replace4(text,what,with)
|
||||
+ ttext = _replace4(text,what,with_)
|
||||
print 'with tag._replace4:',t.stop(),'sec.'
|
||||
if ttext != rtext:
|
||||
print 'results are NOT ok !'
|
Loading…
Reference in a new issue