def createRange(doc, startPoint, startOffset, endPoint, endOffset):
    rng = doc.createRange()
    rng.setStart(startPoint, startOffset)
    rng.setEnd(endPoint, endOffset)

    return rng;
Create a JS range with the given endpoints
dataset/ETHPy150Open pyjs/pyjs/pyjswidgets/pyjamas/selection/Range.py/createRange