[Tutor] Python help!!

David Mitchell d_mitchell89 at hotmail.com
Tue Apr 2 18:49:32 CEST 2013


Hi!
How do I go through a text file, finding specific words/numbers/phrases and edit them to say different things? I do not want to edit the text file, I would rather open and read from the text file and write to a new file. 
I do NOT want to know how to replace a specific word with another every time it appears. There are some "OFF" 's that i would like to change to "ON" 's and some that I would like to change to "OPEN" for example. 
I am doing all this in Linux Fedora with gedit. It is a project assigned to me from my boss and I'm just a co-op student so I could really use the help. 
Any help would be greatly appreciated!!
Thanks,
David  		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130402/a99b76df/attachment-0001.html>


More information about the Tutor mailing list