SOLVED below
hi,
I wrote a small code. I get a strange error that i can't understand.
Here the exemp, if i use:
....
line = linecache.getline(opts.filename, opts.n)
print line
print opts.filename
print opts.n
I get first an empty line (the file is not empty at all), the file name and the integer correct:
then if without any change except replace
line = linecache.getline(opts.filename, opts.n)
with
line = linecache.getline('fileinput', 10)
I get the result correct:
Is very strange for me, maybe there's something that i miss in using linecache.
Any idea?
Thanks a lot
D
_________________________________________EDIT
sorry for the useless post i got it,
i have to cast opts.n with int(opts.n)