0
for i in default_proxy_config_data:
        command = "command get %s" % i
        actual_ats_value = os.system(command)

I was expecting that the variable will get the output of the command. But when i ran the script, it prints the value of the command.

config.exec_thread.limit: 2
config.exec_thread.autoconfig: 1
config.accept_threads: 1
esham
  • 1
  • 1
  • possible dupe of: [in python, get the output of system command as a string](http://stackoverflow.com/questions/19243020/in-python-get-the-output-of-system-command-as-a-string), [Running shell command from Python and capturing the output](http://stackoverflow.com/questions/4760215/running-shell-command-from-python-and-capturing-the-output) – chickity china chinese chicken Mar 22 '17 at 02:56

1 Answers1

0

system returns the status of the termination. below code helped.

tmp = os.popen("ls").read()

Thanks for the help.

esham
  • 1
  • 1