SWIG- Convert C++ enum to Python enum
问题 I am working to get C++ class enum to python enum using swig. I have the following implementation in example.h file. namespace colors{ enum class Color{ RED = 0, BLUE = 1, GREEN = 2 }; } My Swig interface file is %module api %{ #include "example.h" %} %include "example.h" But after using swig tool the interface provides the following usage import pywarp_example as impl impl.RED The question arise here is that is it possible to access enum like below thats the way we use in python? impl.Color