Hi Tom,

even the latest  2.18.5 version of web2py is still fully compatible with
Python 2.7.

I think you're running both of your tests with python 3 ;-)
Another possibility is that you've first run your web2py framework with
python 3 and then with python 2 -  you cannot mix them without cleaning up
caches and dbs... Try test02 a fresh copy of the web2py sources, after
being sure to use python2!

Nico

Il giorno gio 4 lug 2019 alle ore 17:41 Tom Clerckx <tcler...@gmail.com> ha
scritto:

> Can anyone confirm that backward compatibility with python2 is broken with
> respect to web2py scripts (or homemade task queueus)?
> I just downloaded version "2.18.5-stable+timestamp.2019.04.08.04.22.03"
> and it looks like the python3 print() function must be used.
>
> Is there any plan to fix this? If not, it would be good to include this
> information in the web2py book.
>
>
> Test01:
> =====
> script "applications/examples/scrips/script01.py" containing only one line:
> print("Test print")
>
> This one executes fine when running:
> python web2py.py -S examples -M -R applications/examples/scrips/script01.py
>
>
> Test02:
> ======
> script "applications/examples/scrips/script01.py" containing only one line:
> print "Test print"
>
> This one fails fine when running:
> python web2py.py -S examples -M -R applications/examples/scrips/script01.py
>
> Traceback (most recent call last):
>   File "/home/tclerckx/Downloads/web2py/gluon/shell.py", line 275, in run
>     execfile(startfile, _env)
>   File "applications/examples/scrips/script01.py", line 1
>     print "Test print"
>                      ^
> SyntaxError: invalid syntax
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/4c095bb7-1cd8-47a2-9b71-94a735dd5681%40googlegroups.com
> <https://groups.google.com/d/msgid/web2py/4c095bb7-1cd8-47a2-9b71-94a735dd5681%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAAE8D_AWT77sC-kwt5v72jx53nfSu2tzeH%3DqQcZjtPVSsyq6QQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to