x = file('1.txt','r')
print x.tell() #显示当前光标位置
x.seek(3)
print x.tell() #没有设置光标位置,默认从头开始移动3个位置
x.seek(5, 1)
print x.tell() #从当前开始移动5个位置
x.seek(2, 2)
print x.tell() #从末尾开始向前移动2个位置
print x.tell() #显示当前光标位置
x.seek(3)
print x.tell() #没有设置光标位置,默认从头开始移动3个位置
x.seek(5, 1)
print x.tell() #从当前开始移动5个位置
x.seek(2, 2)
print x.tell() #从末尾开始向前移动2个位置