AttributeError: ,_io.TextIOWrapper' object has no attribute 'next' This code works perfectly fine outside of Blender, but the next() function does not appear to exist in Blender..

while line:
    if(line == "POSITION:\n"):
        POS1 = '[' + file.next().replace(' ',', ').replace('\n','') + ']'
        POS2 = '[' + file.next().replace(' ',', ').replace('\n','') + ']'
        POS3 = '[' + file.next().replace(' ',', ').replace('\n','') + ']'
        POS4 = '[' + file.next().replace(' ',', ').replace('\n','') + ']'

    try:
        line = file.next()
    except StopIteration:
        break
file.close()
return


(Not all of my code, just the part that reads my file)
Blender 2.6x comes with its own Python in Version 3.3.x, and in Py3k it's __next__().

You can do simpler, however:

for line in file:
    print(line)