From 777f264796323aad09fbfb89d6dc79e02c097c51 Mon Sep 17 00:00:00 2001 From: Jochen Kupperschmidt Date: Mon, 6 Jun 2016 00:29:32 +0200 Subject: [PATCH] Make `raw_input` available on Python 3 by aliasing it to `input`. --- gitfiti.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gitfiti.py b/gitfiti.py index 67efb4dc0..959ecf0ba 100755 --- a/gitfiti.py +++ b/gitfiti.py @@ -21,6 +21,13 @@ except ImportError: # Python 2 from urllib2 import HTTPError, URLError, urlopen +try: + # Python 2 + raw_input +except NameError: + # Python 3 (Python 2's `raw_input` was renamed to `input`) + raw_input = input + GITHUB_BASE_URL = 'https://github.com/'