如何在perforce打印流的特定字段详细信息?

2024-10-01 02:36:54 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在编写一个Python脚本,其中使用以下命令打印perforce的所有流信息:

p4 -ztag stream -o //streams/xyz

输出如下:

^{pr2}$

这样输出就来了。
我是从python打电话来的:

 subprocess.Popen(['p4','-ztag','stream','-o',//streams/xyz], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0].                                          Now, i want to display only Path fields not the rest i.e owner, update, access, etc. So, how will i get this?

现在我只想得到一个名为“重新映射”的字段的信息,而不是其他字段,如所有者、家长等

那么,如何使用filter命令只获取特定字段?在


Tags: 命令脚本信息streamstderrstdoutstreamssubprocess