I've looked, but I'm sure I am missing this. But I have two files.

I have a python one, and a bash command? (I think thats right? Its a file that I can execute and makes changes but isn't a script?)

But I want to launch it from the python script.

The typical use of this file (we will call it a) would be (from the directory it is in):

./a /System/library/extensions/applehda.kext

note the space there, so I am telling a that is the file it is looking for.

How would I put that in a python script?

I've tried subprocess, os.system, and one other, but I am stuck.


The one I tried was:


import sys
import os


This is what I've used in the past

import os

os.system('start "" "%s" False' % path)

start executes the file
"" is the name of the console window
%s is the path to the fie
and False was an argument passed to the exe