Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > cn.bbs.comp.lang.python > #16

Re: 项目有人建议用python写shell脚本。。。

X-Received by 2002:a37:a7c5:: with SMTP id q188mr4697019qke.384.1590215344530; Fri, 22 May 2020 23:29:04 -0700 (PDT)
X-Received by 2002:a25:7302:: with SMTP id o2mr23827007ybc.197.1590215344309; Fri, 22 May 2020 23:29:04 -0700 (PDT)
Path csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups cn.bbs.comp.lang.python
Date Fri, 22 May 2020 23:29:03 -0700 (PDT)
In-Reply-To <54kDTa$dH_@newsmth.net>
Complaints-To groups-abuse@google.com
Injection-Info google-groups.googlegroups.com; posting-host=73.158.4.24; posting-account=vVN0cQoAAAD8pJp1E7QqSSHS9Dh0LTUY
NNTP-Posting-Host 73.158.4.24
References <54kDTa$dH_@newsmth.net>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <20094e2f-633a-4f62-b663-a890bc3616f6@googlegroups.com> (permalink)
Subject Re: 项目有人建议用python写shell脚本。。。
From dequanzhang1995@gmail.com
Injection-Date Sat, 23 May 2020 06:29:04 +0000
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding base64
Lines 14
Xref csiph.com cn.bbs.comp.lang.python:16

Show key headers only | View raw


On Thursday, March 17, 2011 at 7:29:39 AM UTC-7, 猫王 wrote:
> 瞎扯吧,到时候一堆 os.system("...") 有意义么
> 
> 【 在 xingxinghuo (星星火) 的大作中提到: 】
> :     集群项目,需要在linux上编写大量的脚本完成一些工作,本来都是些shell脚本,有人建议全用python替换了,新的也用python写。
> :     写脚本的人对python也不是很熟,请问用python实现shell脚本合适么? 或者说优缺点是什么呢? 代码短?
> 
> 
> --
> 
>  [m [1;37m※ 来源:·水木社区 newsmth.net·[FROM: 124.64.103.*] [m

不合适。 shell脚本写不好的人 python脚本更写不好。如果是独立项目/长期维护/24小时运行程序/大量CPU运算/大量系统调用/项目组只会Python,那这个时候可以换Python写程序。

Back to cn.bbs.comp.lang.python | Previous | Next | Find similar


Thread

Re: 项目有人建议用python写shell脚本。。。 dequanzhang1995@gmail.com - 2020-05-22 23:29 -0700

csiph-web