aditya shukla wrote:
eh, wouldn't it be easier if you actually read the replies to your last
post on this topic? here's an excerpt from the reply you got last time:
which fetches floating point values from the text file example you
posted last time:
if the values have moved to some other column, adjust line[1] accordingly.
</F>
I have a text file whose contents are like this:-
>
jd|fj|dnv|jd|0. 33|c:\\windows\ \win32
shcbsbs|nscsjsj |0.93|hsbcjsnc
>
I am trying to read the file like this:-
>
>
jd|fj|dnv|jd|0. 33|c:\\windows\ \win32
shcbsbs|nscsjsj |0.93|hsbcjsnc
>
I am trying to read the file like this:-
>
>>x = open("c:\\a.txt ","r")
>>x.read()
>>x.read()
post on this topic? here's an excerpt from the reply you got last time:
Extracting is easy; you can do something like
>
data = []
for line in open("test.txt" ):
line = line.split("|")
data.append(flo at(line[1]))
>
data = []
for line in open("test.txt" ):
line = line.split("|")
data.append(flo at(line[1]))
posted last time:
0\9\10\11|0.50| c:\windows\appp atch/AcLayers.dll
0\9\10\11|0.50| c:\windows\appp atch/AcRedir.dll
0\9\10|0.66|c:\ windows\apppatc h/AcSpecfc.dll
0\9|0.83|c:\win dows\apppatch/iebrshim.dll
0\9\10\11|0.50| c:\windows\appp atch/AcRedir.dll
0\9\10|0.66|c:\ windows\apppatc h/AcSpecfc.dll
0\9|0.83|c:\win dows\apppatch/iebrshim.dll
</F>