Python 2.x does not have an equivalent of the enum in C or C++. Python 3.x (3.4 and later) has a builtin enum type.
You can install the backported Python 3.4 enum for Python 2.x easily from here:
$ sudo pip install enum34
Usage of this enum is simple:
from enum import Enum class Colors(Enum): Red = 1 Green = 2 Blue = 3 c = Colors.Green
Tried with: Python 2.7.6 and Ubuntu 14.04