Sorry I forgot one thing.
I tried to remove the replace () function and only got a blank page.
I would like to find a way to iterate between printing both the location or
record[3] and the sentence
On May 26, 2016 08:04, "Maurice Waka" <mauricew...@gmail.com> wrote:

> I initially had a code :
> for records in records:
>     id = record[0]
>     location = record[3]
>     code....
>     return location
> with wb2py code as:
> def consult_p():
>     code...
>     if list_func:
>     return list_func
> report = consult_p()
>
> view_consult code:
> {{while true:}}{{break}}
> <div class = "well>"
>      code..
>      <font size ="2.5" {{=XML(report.replace('\n', '<br>'))}}{{break}}
> {{pass}}
>
> This would work well by printing the data from the DB(everything in the
> row page)
>
> but when trying to print a section of the data, say a string, using the
> same process but with code at sqlite level as follows:
> import sqlite
> location = record[3]
> if id == name2:
>     corpus = [location]
>     words = unidecode([location][0])
>     sent = ['  '.join(words.split())]
>     code...
>
>     for sentence in sentences1:
>         if x in re.findall(regex code,sentence):
>             return ''.join([" ".join(]sentence1[m-1],j]) for m,j in
> enumarate(sentences1) if x in re.findall(regex code,j)])## this is to print
> only a section of the data in location or record[3] from sqlite
> when running this in web2py, I get the above error.
> How can I convert this from tuple to list? or at least print the sentence
> in a web page
> Regards
> Maurice
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/NSROi6GokcU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to