-3

I am confused by the concepts of running a python script within a python program. Is this possible? could I take the output of the script and use it further on in the program? or vice versa take program output to run a script?

My thought child at the moment is an attempt to pull info from an hp server's ilo, and there exists a script to do it. But I want to change the output from an ordered dictionary to a json. Could I run that script in a python program I wrote and convert it within the program?

Any help/examples are appreciated, or reference materials for me to draw my own conclusions, google isn't turning up exactly what I am searching for.

Uifd
  • 1
  • 1

1 Answers1

-2

Sure it's possible, have you tried using the exec and eval commands?

Edit/update: Also I remembered you can also make modules and import them.

Professor Dragon
  • 195
  • 1
  • 3
  • 12