0

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

3 Answers 3

4

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'])
Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.