I want to run the command df -h to display disk information, But when i run my code nothing is displayed in the terminal, I even tried to do "df -h > out.txt" and then cat out.txt but that didn't work either.
import sys
import os
import subprocess
def main():
os.system('clear')
print("Options: \n")
print("1 - Show disk info")
print("2 - Quit \n")
selection = input('> ')
if selection == 1:
subprocess.call(['df -h'], shell=True)
elif selection == 2:
sys.exit(0)
if __name__ == "__main__":
main()