Update Python 3 compatibility
This commit is contained in:
+4
-2
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user