tags:

views:

44

answers:

1

Hi everyone ,

count_record=file.readline()
 count_prev=count_record[:-1] ,

i used this to read the previous line and it worked but now when i am using

count_next=count_record[:+1] i am not able to read the next line , is there is way to do so read the next time .

Thanks for your help

+1  A: 

I'm not familiar enough with jython to know what type of data structure count_record is here, or how it ought to be used.

However, I do know that in any case, it is the call to file.readline() that is getting the next line.

If you want to use the next line, you will need to call readline again. So, for a quick example, your code would look something like this:


count_record=file.readline()  
...  
 //use count_record here  
...  
count_record=file.readline()  
...  
  // We now have the second line, use it here  
...
KevenK
Thanks again . you were right it worked
kdev