0

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.

Thanks!

3
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by ihatehippies
0

The one I tried was:

#!/usr/bin/python

import sys
import os

os.system("a")
0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.