def find_position(string, index):
    leading = string[:index].splitlines()
    return (len(leading), len(leading[-1])+1)
Given a string and index, return (line, column)
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Paste-2.0.1/paste/util/template.py/find_position