How do we check whether an os.system()
function has executed properly, and if it didn't then print os.system could not work
?
For example:
import os
os.system('ping 192.168.1.1')
How do we know the cmd command was executed, and how can we get its return value?