Running command lines within your Python script

cmd, python, windows

Solution

You should use the subprocess module. In particular, subprocess.call will run command line programs for you.

Problem

So I have a bunch of aliases and Command Line prompt programs, and my main program works by inputting b into the cmd.exe, followed by some filepath names and what not. How would I run those arguments in my python script? So that it mimics the action i am doing in the cmd?

Original source