perl to python
Donald 'Paddy' McCarthy
paddy3118 at netscape.net
Sun May 9 16:19:39 EDT 2004
Olivier Scalbert wrote:
> Jarek Zgoda wrote:
>
>> Olivier Scalbert <olivier.scalbert at algosyn.com> pisze:
>>
>>
>>
>>> What is the python way of doing this :
>>> perl -pi -e 's/string1/string2/' file
>>>
>>
>>
>> Use sed.
>>
>>
>>
> yes, but in python ?
I wonder what the motivation behind your question is?
Do you have Python and not Perl or sed available?
Is the request from part of a larger conversion task?
Do you just want to compare the Perl to the Python solution?
Pad.
More information about the Python-list
mailing list