0

I am a Python beginner (using 2.7) and want to know if there is a way for a program that I have written to run other programs.

Basically, I want to build a program that evaluates other programs.

2
  • 1
    Why would you want to do that? Commented Sep 25, 2012 at 21:00
  • What type of evaluation? Commented Sep 25, 2012 at 21:00

1 Answer 1

4

Check out the subprocess module. One of the examples given there:

>>> subprocess.check_output(["echo", "Hello World!"])
'Hello World!\n'

That should be pretty much all you need

Sign up to request clarification or add additional context in comments.

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.