I have below code snippet. Will the last two print statements equivalent? Kindly advise.
P1 = Popen(shlex.split(hdfs_rm_command), stdout=subprocess.PIPE, stderr=subprocess.PIPE,
universal_newlines=True)
o4, e4 = P1.communicate()
if P1.returncode != 0:
print(e4)
print(P1.stderr)