Jason R. Coombs avatar Jason R. Coombs committed 31e407c

Use 'input' for Python 3 compatibility

Comments (0)

Files changed (1)

 
 VERSION='3.2.3'
 
+if sys.version_info < (3,):
+	input = raw_input
+
 def get_next_version():
 	digits = map(int, VERSION.split('.'))
 	digits[-1] += 1
 	"""
 	print("You're about to release CherryPy {NEXT_VERSION}".format(
 		**globals()))
-	res = raw_input('Have you run the tests with `nosetests -s ./` on '
+	res = input('Have you run the tests with `nosetests -s ./` on '
 		'Windows, Linux, and Mac on at least Python 2.4, 2.5, 2.7, and 3.2? '
 		.format(**globals()))
 	if not res.lower().startswith('y'):
 		print("Unable to upload the dist files. Ask in IRC for help access "
 			"or assistance.")
 		raise SystemExit(4)
-	res = raw_input('Have you asked in IRC for others to help you test '
+	res = input('Have you asked in IRC for others to help you test '
 		'CherryPy {NEXT_VERSION}? '
 		.format(**globals()))
 	if not res.lower().startswith('y'):
 		print("Please do that")
 		raise SystemExit(2)
 	subprocess.check_call([sys.executable, 'setup.py', 'register'])
-	res = raw_input("Have you confirmed that the distro installs properly "
+	res = input("Have you confirmed that the distro installs properly "
 		"with `easy_install CherryPy=={NEXT_VERSION}`? ".format(**globals()))
 	if not res.lower().startswith('y'):
 		print("Please do that")
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.