Considering the following example:
P1 = subprocess.Popen(stdout=subprocess.PIPE, stderr=subprocess.PIPE)
P1.stdout.readLines()
In the above example , is it possible to count the number of lines as output from the p1?because I can iterate line by line by using p1.stdout.readLines(),
but that’s not what I want , I need the total number of lines as output… Is this scenario possible?