Re: [web2py] Help needed with web2py-book app

2018-12-07 Thread Massimo Di Pierro
Merged. Will deploy tomorrow. Excellent and very much appreciated. On Tuesday, 4 December 2018 00:51:53 UTC-8, Nico Zanferrari wrote: > > Yes, the online version of the book is a web2py application - and I've > made it Python 3 compatible with that PR. > > But indeed the content of the book itsel

Re: [web2py] Help needed with web2py-book app

2018-12-04 Thread Ari Lion BR Sp
Congrratulations and Thanks, Nico ari / brazil Em terça-feira, 4 de dezembro de 2018 05:51:53 UTC-3, Nico Zanferrari escreveu: > > Yes, the online version of the book is a web2py application - and I've > made it Python 3 compatible with that PR. > > But indeed the content of the book itself is

Re: [web2py] Help needed with web2py-book app

2018-12-04 Thread Nico Zanferrari
Yes, the online version of the book is a web2py application - and I've made it Python 3 compatible with that PR. But indeed the content of the book itself is still mainly Python2-oriented any help is appreciated ;-) Nico Il giorno Lun 3 Dic 2018, 18:17 Marcelo Huerta ha scritto: > El sábad

Re: [web2py] Help needed with web2py-book app

2018-12-03 Thread Marcelo Huerta
El sábado, 24 de noviembre de 2018, 19:48:32 (UTC-3), Nico Zanferrari escribió: > > I'm proud to announce that I've finished the work, and now the web2py book > is python3 compatible, as with PR #395 > It was a hard work for > me, but I've learne

Re: [web2py] Help needed with web2py-book app

2018-11-24 Thread Nico Zanferrari
Hi, I'm proud to announce that I've finished the work, and now the web2py book is python3 compatible, as with PR #395 It was a hard work for me, but I've learned a lot ;-) Cheers, Nico Il giorno lun 15 ott 2018 alle ore 22:26 Nico Zanferrari ha s

Re: [web2py] Help needed with web2py-book app

2018-10-15 Thread Nico Zanferrari
Thank you all, I've finally resolved by using io.open() for the encode problem, and by putting the message in the redirect for bypassing the session.forget() command. Nico Il giorno ven 12 ott 2018 alle ore 21:34 Dave S ha scritto: > > > On Friday, October 12, 2018 at 2:52:44 AM UTC-7, Nico Z

Re: [web2py] Help needed with web2py-book app

2018-10-12 Thread Dave S
On Friday, October 12, 2018 at 2:52:44 AM UTC-7, Nico Zanferrari wrote: > > Hi Dave! > > On > https://github.com/web2py/web2py-book/blob/master/controllers/default.py > the session.forget() command is on line 10 - and I suppose it's quite > necessary. > > I wonder if that's for development, l

Re: [web2py] Help needed with web2py-book app

2018-10-12 Thread Nico Zanferrari
Hi Dave! On https://github.com/web2py/web2py-book/blob/master/controllers/default.py the session.forget() command is on line 10 - and I suppose it's quite necessary. If I change the convert2html function in order to test for import errors: try: from pygments import highlight as pygm

Re: [web2py] Help needed with web2py-book app

2018-10-12 Thread Dave S
On Thursday, October 11, 2018 at 1:29:04 PM UTC-7, Nico Zanferrari wrote: > > Thank you Ben, > > I was looking at the same official page ;-) > It seems that using the io module is the way to go, and it's already used > in pymysql . I'm testing it. > > Nobody has suggestions about the session.f

Re: [web2py] Help needed with web2py-book app

2018-10-11 Thread Nico Zanferrari
Thank you Ben, I was looking at the same official page ;-) It seems that using the io module is the way to go, and it's already used in pymysql . I'm testing it. Nobody has suggestions about the session.foget() and session.flash message? thank you, nico Il giorno gio 11 ott 2018 alle ore 17:3

Re: [web2py] Help needed with web2py-book app

2018-10-11 Thread Ben Duncan
Also found this: http://python-future.org/compatible_idioms.html On Thu, Oct 11, 2018 at 10:30 AM Ben Duncan wrote: > Try These suggestions: > > > https://stackoverflow.com/questions/491921/unicode-utf-8-reading-and-writing-to-files-in-python/83 > http://www.evanjones.ca/python-utf8.html >

Re: [web2py] Help needed with web2py-book app

2018-10-11 Thread Ben Duncan
Try These suggestions: https://stackoverflow.com/questions/491921/unicode-utf-8-reading-and-writing-to-files-in-python/83 http://www.evanjones.ca/python-utf8.html On Thu, Oct 11, 2018 at 9:38 AM Nico Zanferrari wrote: > Hi, > > the encode-decode problem on question 1 is mostly related to t

Re: [web2py] Help needed with web2py-book app

2018-10-11 Thread Nico Zanferrari
Hi, the encode-decode problem on question 1 is mostly related to the opening of files. For example: filename = os.path.join(FOLDER, subfolder, 'chapters.txt') if PY2: lines = open(filename) else: lines = open(filename, encoding='utf-8') In PY2 there is no option for t

Re: [web2py] Help needed with web2py-book app

2018-10-11 Thread Ben Duncan
Exactly what are you running into? I ran into this with my rewrite of of extract extract_pgsql_models.py: .. f['type'] = "'decimal({},{})'".format(f['precision'],f['scale']) had to become f['type'] = "'decimal({0},{1})'".format(f['precision'],f['scale']) And so one. The changes work acr