Tab delimited file

Gabriel Genellina gagsl-py at yahoo.com.ar
Fri Aug 11 19:09:41 EDT 2006


At Friday 11/8/2006 11:41, Colin Wildsmith wrote:

>I am making a gui for the purpose that I can 
>change the values in a list of different 
>criteria which is found in a text file, such as:
>
>Name(tab)rating(tab)breast size(tab)occurrences
>

>

>

>
>However as far as I know Python does not allow 
>you to easily change a specific line in a text 
>file. You have to place the whole file to 
>memory, change what you need to and then write 
>the file back after deleting the previous information.

Yes. If the lines are not all fixed-length, this 
is true in general for any language, not only Python.

>  Assuming this is true, how do i find where the 
> tabs are in the file so that I can distinguish between the different criteria?
>Assuming this is not true, does anyone suggest another way to do it?

Look at the csv module: http://docs.python.org/lib/module-csv.html



Gabriel Genellina
Softlab SRL 


	
	
		
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas




More information about the Python-list mailing list