pyCraft/minecraft/compat.py

20 lines
463 B
Python
Raw Normal View History

2015-04-06 02:11:26 +02:00
"""
This module stores code used for making pyCraft compatible with
both Python2 and Python3 while using the same codebase.
"""
# Raw input -> input shenangians
# example
# > from minecraft.compat import input
# > input("asd")
# Hi, I'm pylint, and sometimes I act silly, at which point my programmer
# overlords need to correct me.
# pylint: disable=undefined-variable
2015-04-06 02:11:26 +02:00
try:
input = raw_input
except NameError:
pass
# pylint: enable=undefined-variable