From 342bebc7330d532d499b54726798845f2e36f850 Mon Sep 17 00:00:00 2001 From: cclauss Date: Mon, 7 Jan 2019 08:58:43 +0100 Subject: [PATCH] Define raw_input() in Python 3 __raw_input()__ was removed in Python 3 in favor of a reworked version of __input()__. This change ensures equivalent functionality in both Python 2 and Python 3. --- inter/GetRandCode.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inter/GetRandCode.py b/inter/GetRandCode.py index 8d496e4..e95f8c8 100644 --- a/inter/GetRandCode.py +++ b/inter/GetRandCode.py @@ -4,6 +4,11 @@ from PIL import Image from config.ticketConf import _get_yaml from damatuCode.ruokuai import RClient +try: + raw_input # Python 2 +excpet NameError: # Python 3 + raw_input = input + def getRandCode(is_auto_code, auto_code_type, result): """