A module designed to do this is fileinput:<br><br><a href="http://docs.python.org/library/fileinput.html">http://docs.python.org/library/fileinput.html</a><br><br>The approach is the same as the other except that it's in the standard library.<br>
<br><div class="gmail_quote">2010/6/5 Paul Rubin <span dir="ltr"><no.email@nospam.invalid></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">Steve <<a href="mailto:vvw25w@googlemail.com">vvw25w@googlemail.com</a>> writes:<br>
> Remove all comma's<br>
> Replace all @ with comma's<br>
> Save as a new file.<br>
<br>
</div>The simplest way is just copy the file one character at a time, making<br>
replacements to commas and @'s as stated. That will be a bit slow<br>
(especially in Python) but if you only have to do it once, just wait it<br>
out.<br>
<div><div></div><div class="h5">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>