You could achieve the same effect by replacing all '_' with a space and then using the `title()` function of string: http://docs.python.org/2/library/stdtypes.html#str.title