def read_until(self, data, offset, stopchar):
    buf = []
    char = data[offset:offset+1]
    i = 2
    while char != stopchar:
      # Consumed all the characters and havent found ';'
      if i+offset > len(data):
        raise Exception("Invalid")
      buf.append(char)
      char = data[offset+(i-1):offset+i]
      i += 1

    # (chars_read, data)
    return (len(buf), "".join(buf))
Get one snippet from a project
dataset/ETHPy150Open videlalvaro/InspectorD/PHPUnserialize.py/PHPUnserialize.read_until--crossover with--dataset/ETHPy150Open pyapi-gitlab/pyapi-gitlab/gitlab/__init__.py/Gitlab.getsnippet