Update Python 3 compatibility

This commit is contained in:
Vinyl Darkscratch
2019-02-09 00:01:11 -08:00
parent fcea326855
commit f434ebec8a
29 changed files with 112 additions and 152 deletions
+4 -2
View File
@@ -9,7 +9,6 @@
The widget is called from web2py
----------------------------------
"""
from __future__ import print_function
import datetime
import sys
@@ -31,6 +30,9 @@ from gluon.settings import global_settings
from gluon.shell import run, test
from gluon.utils import is_valid_ip_address, is_loopback_ip_address, getipaddrinfo
if PY2:
input = raw_input
ProgramName = 'web2py Web Framework'
ProgramAuthor = 'Created by Massimo Di Pierro, Copyright 2007-' + str(
@@ -952,7 +954,7 @@ def console():
if options.gae:
if not os.path.exists('app.yaml'):
name = raw_input("Your GAE app name: ")
name = input("Your GAE app name: ")
content = open(os.path.join('examples', 'app.example.yaml'), 'rb').read()
open('app.yaml', 'wb').write(content.replace("yourappname", name))
else: