[python-debian/master 21/36] Python 3 renamed raw_input to input.

Colin Watson cjwatson at canonical.com
Mon Oct 8 07:41:22 UTC 2012


---
 examples/debtags/pkgwalk |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/examples/debtags/pkgwalk b/examples/debtags/pkgwalk
index 6babd45..639d877 100755
--- a/examples/debtags/pkgwalk
+++ b/examples/debtags/pkgwalk
@@ -105,7 +105,10 @@ if __name__ == '__main__':
 
 		# Ask the user to choose a new package
 		while True:
-			ans = raw_input("> ").strip()
+			if sys.version >= '3':
+				ans = input("> ").strip()
+			else:
+				ans = raw_input("> ").strip()
 			if ans[0] == 'q':
 				done = True
 				break
-- 
1.7.2.5





More information about the pkg-python-debian-commits mailing list