Use print() function in both Python 2 and Python 3 (#722)
* Use print() function in both Python 2 and Python 3
Legacy __print__ statements are syntax errors in Python 3 but __print()__ function works as expected in both Python 2 and Python 3.
* Fix undefined names
diff --git a/describe.py b/describe.py
index eb7a0f1..636eb5d 100755
--- a/describe.py
+++ b/describe.py
@@ -20,6 +20,7 @@
The documentation is generated from a combination of the discovery document and
the generated API surface itself.
"""
+from __future__ import print_function
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
@@ -354,7 +355,7 @@
try:
service = build(name, version)
except UnknownApiNameOrVersion as e:
- print 'Warning: {} {} found but could not be built.'.format(name, version)
+ print('Warning: {} {} found but could not be built.'.format(name, version))
return
http = build_http()