[Zope] Don't treat .data as a big string.

Kyler B. Laird laird@ecn.purdue.edu
Thu, 21 Jun 2001 17:51:14 -0500


On Thu, 21 Jun 2001 15:55:15 -0600 (MDT) you wrote:
>What version of python, zope, and os?

Python 1.5.2
Zope 2.3.3
Mandrake 8.0
Linux 2.4.5-ac9 SMP

The little test External Method I used to verify
this was essentially this.
	def strlen(text):
		printed = 'len=%d\n' % len(text)
		for i in range(0, len(text), 1024):
			printed = printed + '%d: %d\n' % (i, len(text[i:]))

The output is
	len=811008
	0: 90112
	1024: 89088
	2048: 88064
	3072: 87040
	4096: 86016
	5120: 84992
	6144: 83968
	7168: 82944
	8192: 81920
	9216: 80896
	.
	.
	.
	71680: 18432
	72704: 17408
	73728: 16384
	74752: 15360
	75776: 14336
	76800: 13312
	77824: 12288
	78848: 11264
	79872: 10240
	80896: 9216
	81920: 8192
	82944: 7168
	83968: 6144
	84992: 5120
	86016: 4096
	87040: 3072
	88064: 2048
	89088: 1024
	90112: 0
	91136: 0
	92160: 0
	93184: 0
	94208: 0
	95232: 0
	96256: 0
	97280: 0
	98304: 0
	99328: 0
	100352: 0
	.
	.
	.
	807936: 0
	808960: 0
	809984: 0

(Note that it breaks in a different place
than I noticed before.  I'm using a
different file, I think.)

All I have to do to make it work is throw
"str()" around "text".
	
--kyler