Reputation: 2772
I'm trying to start an application using Python. I've seen that some people use startfile but I also read that it only works with Windows. I'm using Mac systems and hoping for it to work with them. Thanks, Aaron
Upvotes: 0
Views: 701
Reputation: 80031
Python has the subprocess module for that, you can read about it here: http://docs.python.org/library/subprocess.html
In it's simplest form:
subprocess.call(['your_command', 'params'])
Upvotes: 4
Reputation: 134177
Try using os.system - the docs say it is supported on UNIX and Windows, but since OSX is UNIX-based I would expect it to work on that platform as well.
Upvotes: 0
Reputation: 83250
You can use os.system("/path/to/myapp")
.
See http://docs.python.org/library/os.html#os.system for documentation.
If you want more control over the process being executed, check out the subprocess module instead.
Upvotes: 1