Skip to content

Str to raw str

py
def _str_to_raw(self, in_str):
    """ Convert string to raw string, useful for path.
    :param in_str: Input string.
    :type in_str: str

    :return: Raw string
    :rtype: str
    """
    # return repr string without start and end quote
    return repr(in_str)[1:-1]