

def get_tvtk_name(vtk_name):
    "Converts a VTK class name to a TVTK class name.\n\n    This function additionally converts any leading digits into a\n    suitable string.\n\n    For example:\n\n      >>> get_tvtk_name('vtk3DSImporter')\n      'ThreeDSImporter'\n      >>> get_tvtk_name('vtkXMLDataReader')\n      'XMLDataReader'\n\n    "
    if (vtk_name[:3] == 'vtk'):
        name = vtk_name[3:]
        dig2name = {
            '1': 'One',
            '2': 'Two',
            '3': 'Three',
            '4': 'Four',
            '5': 'Five',
            '6': 'Six',
            '7': 'Seven',
            '8': 'Eight',
            '9': 'Nine',
            '0': 'Zero',
        }
        if (name[0] in string.digits):
            return (dig2name[name[0]] + name[1:])
        else:
            return name
    else:
        return vtk_name

dataset/ETHPy150Open enthought/mayavi/tvtk/common.py get_tvtk_name/original