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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to