Is there a way to assign the terminal output to a varibale then print it to the screen, using os.popen()
For example:
import os
output = os.popen("dir")
print(output)
Is this possible?
Is there a way to assign the terminal output to a varibale then print it to the screen, using os.popen()
For example:
import os
output = os.popen("dir")
print(output)
Is this possible?
Yes it is possible but you should do it like this:
import os
output = os.popen("dir")
preprocessed = output.read()
print(preprocessed)