I am currently creating a program to extract file from drives. I would like to ask how I read an output that is displayed using python shell? For example:
while i<len(drives):
print 'Searching for file in:', drives[i]
print ''
for root, dirs, files in os.walk(drives[i]):
for file in files:
if file.endswith(".vmdk"):
print os.path.join(root, file)
if file.endswith(".vbox"):
print os.path.join(root,file)
i+=1
I would like to read the output of print os.path.join(root,file)
input this to another command. Is this possible?