Stop a command line command in script
<p>I'm writing a script in which I want to be able to run a command line command, probably with os.system("stuff").  But what if my command doesn't end on its own?  Like, normally in my terminal I have to ctl+C to end it.  Is there a way that I can run it, stop it, and grab the output?</p>

<p>I'm sure there has to be but I don't know it, and I'm not sure if I know the correct terminology to find it (all my Python is self-taught from experimenting)</p>

<p>Thanks!</p>