Python Basics – calling system commands (A cheat for BASH users)


Video is ready, Click Here to View ×

21 thoughts on “Python Basics – calling system commands (A cheat for BASH users)

  1. i have a doubt i am unable to create a loop inside the os.system but when i execute commands it is working. Like below

    os.system ( "hostname;uptime" ) –> working
    os.system ( "hostname; if [ $? -eq 0 ]; then echo "hello"; fi " ) not working

    Do i have run loops only only in python format or did i made any mistake

  2. It would be great if there was a way to get the results of a system command (python or otherwise) into a variable for further processing. There some some things best done through system calls (I'm thinking of netstat, nslookup, etc.), but I would like to be able to parse the output and then work with the data.

  3. I'm really impressed by how many videos you're putting up;
    I hope you keep going! I found your ZynAddSubFX and linux audio videos were amazingly helpful. Thank you!

    My only comment would be a small request: when posting a video, could you make the description a little more detailed, so I know if it's on stuff I know? E.g. Arduino: I'm interested in how to control a servo from software, but already know what a servo is and how it works, so can skip the basic intro.

Leave a Reply

Your email address will not be published. Required fields are marked *