Fix Python 3 compatibility in the irrelevant code! (#86)

This commit is contained in:
cclauss 2018-06-21 21:47:51 +02:00 committed by Satwik Kansal
parent 07861a045d
commit 2fb04501f7
1 changed files with 7 additions and 1 deletions

View File

@ -2,7 +2,7 @@
"""
This inefficient module would parse the README.md in the initial version of
WTFPython, and enabl me to categorize and reorder a hell lot of examples with
WTFPython, and enable me to categorize and reorder a hell lot of examples with
the help of the file `add_categories` (part of which is automatically
generated).
@ -10,6 +10,12 @@ After the refactor, this module would not work now with necessary updates in
the code.
"""
try:
raw_input # Python 2
except NameError:
raw_input = input # Python 3
fname = "README.md"
snippets = []