find, replace and save string in ascii file

Gabriel Genellina gagsl-py at yahoo.com.ar
Wed Aug 23 10:34:16 EDT 2006


At Wednesday 23/8/2006 09:48, peter wrote:

>What I did is that I can find all strings which I need, next I change
>these strings based on CODE, but what I can't is to replace old string
>with new one, on the same position in the file. It always writes new
>string at the end of the file. Here is my code....

Better create a new file with the new contents, and then rename it.



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