perl to python [英] perl to python

查看:56
本文介绍了perl to python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


这样做的python方式是什么:

perl -pi -e'/ string1 / string2 /''文件



谢谢

Olivier

解决方案

Olivier Scalbert <醇************** @ algosyn.com> pisze:

这样做的python方法是什么:
perl -pi -e'/ string1 / string2 /''file



使用sed。


-

Jarek Zgoda
http://jpa.berlios.de/


Jarek Zgoda写道:

Olivier Scalbert< ol ************** @ algosyn.com> pisze:

这样做的python方式是什么:
perl -pi -e'/ string1 / string2 /''file


使用sed。



是的,但在python中?


Olivier Scalbert< ol ************** @ algosyn.com> pisze:

执行此操作的python方式是什么:
perl -pi -e'' s / string1 / string2 /''file



使用sed。



是的,但是在python中?




你是否因为在Python中做所有事而付钱?这个问题要容易得多。

通过其他方式解决。


当然,这是可能的。我很确定你会在这里获得这样的

解决方案。


-

Jarek Zgoda
< a rel =nofollowhref =http://jpa.berlios.de/target =_ blank> http://jpa.berlios.de/


Hello ,

What is the python way of doing this :
perl -pi -e ''s/string1/string2/'' file
?
Thanks
Olivier

解决方案

Olivier Scalbert <ol**************@algosyn.com> pisze:

What is the python way of doing this :
perl -pi -e ''s/string1/string2/'' file



Use sed.

--
Jarek Zgoda
http://jpa.berlios.de/


Jarek Zgoda wrote:

Olivier Scalbert <ol**************@algosyn.com> pisze:

What is the python way of doing this :
perl -pi -e ''s/string1/string2/'' file



Use sed.


yes, but in python ?


Olivier Scalbert <ol**************@algosyn.com> pisze:

What is the python way of doing this :
perl -pi -e ''s/string1/string2/'' file



Use sed.



yes, but in python ?



Are you paid for doing everything in Python? This problem is much easier
to sort out by other means.

But of course, it is possible. I''m pretty sure you will get such
solution here.

--
Jarek Zgoda
http://jpa.berlios.de/


这篇关于perl to python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆