import sys from io import StringIO def getdata(): ret = StringIO() with open(sys._getframe().f_back.f_code.co_filename,'rb') as f: strStart = None while True: line = f.readline() if not line or line.rstrip().decode('utf-8') == '__END__': break strStart = line.rstrip() # read until the str finishes as ret should not contain trailing quote prev = None while True: line = f.readline() if not line or l