Re: [Zope] Best Zope way to split a textfield on 2000 char increments

2000-12-15 Thread Bill Anderson
Bill Anderson wrote: > > Jerome Alet wrote: > > > > On Fri, 15 Dec 2000, Steve Drees wrote: > > > > > somestring[:1999] is the first 2000 characters of somestring. > > > > Not to be a poseur but: > > me either ;^)= > > > > somestring[:1999] is the first 1999 characters of somestring, because >

Re: [Zope] Best Zope way to split a textfield on 2000 char increments

2000-12-15 Thread Bill Anderson
Jerome Alet wrote: > > On Fri, 15 Dec 2000, Steve Drees wrote: > > > somestring[:1999] is the first 2000 characters of somestring. > > Not to be a poseur but: me either ;^)= > somestring[:1999] is the first 1999 characters of somestring, because > in Python indices begin at 0, e.g.: Actual

RE: [Zope] Best Zope way to split a textfield on 2000 char increments

2000-12-15 Thread Jerome Alet
On Fri, 15 Dec 2000, Steve Drees wrote: > somestring[:1999] is the first 2000 characters of somestring. Not to be a poseur but: somestring[:1999] is the first 1999 characters of somestring, because in Python indices begin at 0, e.g.: a="0123" print a[:3] gives "012" which are the first 3 chara

RE: [Zope] Best Zope way to split a textfield on 2000 char increments

2000-12-15 Thread Steve Drees
> I just realized I need to split a potentially pretty long textfield > input from a web form into 2000 character chunks, for input into a > database. I see a lot of string functions in DTML, but none that > looks like it will do this.. string slices. somestring[:1999] is the first 2000 char

Re: [Zope] Best Zope way to split a textfield on 2000 char increments

2000-12-15 Thread Chris Withers
Chris Beaumont wrote: > > Hi, > > I just realized I need to split a potentially pretty long textfield > input from a web form into 2000 character chunks, for input into a > database. I see a lot of string functions in DTML, but none that > looks like it will do this.. Use a Python Script: you

[Zope] Best Zope way to split a textfield on 2000 char increments

2000-12-15 Thread Chris Beaumont
Hi, I just realized I need to split a potentially pretty long textfield input from a web form into 2000 character chunks, for input into a database. I see a lot of string functions in DTML, but none that looks like it will do this.. I'm hoping to use this as a workaround for the seeming lack