Here is the command I used to get the file info, in which am interested in only revision version. command:
command='si revisioninfo D:/Documentation/file_folder/file.c'
process = Popen(args=command,stdout=PIPE,shell=True)
file_output=process.communicate()[0]
print file_output
output:
Sandbox Name: D:/Documentation/project.pj
Revision: 1.7
Labels: Review_1
Out of these I want just the revision data to be assigned to the output.
If the revision part is always the second line of the output you could use splitlines() to split the string by newline:
If that is not the case you could always get the first line that starts with
'Revision:':