If you are wanting to split the text in python, just use splices!
MAX_LENGTH = 252
mystr = """
this is actually a very very long text blob about why this guy on his
blog thinks that IE is evil, though it has no real content and is really
just a waiste of time reading!
"""
You can go
shortstr = mystr[0:MAX_LENGTH] + "..."
or
lastword = mystr.find(" ", MAX_LENGTH)
shortstr = mystr[0:lastword] + "..."
-Thadeus
On Thu, Oct 8, 2009 at 7:57 AM, Boris Manojlovic <[email protected]
> wrote:
> rd" way would be count words and if too long (or too many chars)
> split at last space in "too much" from right s
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---