You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
269 B

"""
Shared utility classes and functions.
"""
import codecs
class EnumBase(object):
_names = dict()
@classmethod
def name(cls, enum_value):
return cls._names[enum_value]
def get_utf8_writer(writer):
return codecs.getwriter("utf8")(writer)