-1

What command must I use in Python to invoke a program and receive a parameter in return.

Not a return "OK" or "not OK", but a returning identifier from the program that was invoked.

I am using subprocess.call, but I know that not works.

I am using Python 2.4.4.

maazza
  • 7,016
  • 15
  • 63
  • 96
Fernando
  • 171
  • 1
  • 5

1 Answers1

0

You may receive a result and pass a parameter. Terminology is not correct :)

Process returns a result of invocation. It would be 0 (success) or not zero (error condition).

Subprocess.Popen() is for your needs. Pass input to STDIN and get output from STDOUT. Called process must drop their results to STDOUT. Or use another IPC.

Vitaly Greck
  • 658
  • 5
  • 9