problem with receiving

i have a text document with some position take it from the arduino like a record a position and save it in this text and after that i send this position again to the arduino by using Pyserial .
i want some help with code in arduino for how can I receive this position
and apply it on the servos .
when i press 7 all the positions appernce and i selected one of this position so i want to send it and received in arduino.

elif inp =='7':
file= open("text.txt","r")
print file.read()
name = raw_input ("write the name of the position : ")
search = open("text.txt")
for line in search:
if name in line:
print line
ser.write(line)
#send=ser.write()
#print (send)
else :
print "wrong name"
file.close()
............................................................................

7
take 2[125, 534, 491, 221, 801, 803, -1, 513]
take 10[125, 534, 491, 221, 801, 803, -1, 513]
take 3[125, 534, 491, 221, 801, 803, -1, 513]

write the name of the position : take 2
take 2[125, 534, 491, 221, 801, 803, -1, 513]

i have a text document

On the Arduino? The Arduino can't have a text document, without additional hardware.

with some position take it from the arduino

Or is the file on the PC, containing data that the Arduino sent to the serial port?

i want some help with code in arduino for how can I receive this position
and apply it on the servos .

Seria input basics - updated

PaulS:
On the Arduino? The Arduino can't have a text document, without additional hardware.
Or is the file on the PC, containing data that the Arduino sent to the serial port?
Seria input basics - updated

yes sir on my pc and the data take it from Arduino

This Python - Arduino demo may help.

...R