Hello, 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
+1
A:
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.
danben
2010-06-01 15:49:48
A:
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.
Justin Ethier
2010-06-01 15:50:19
+4
A:
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'])
WoLpH
2010-06-01 15:51:44