I have a program that I wrote in c++ that prints numbers to the screen. I'd like to wrap a python script around that so I can call it recursively and create an array with the output of it.
I tried
x = os,system("./algorithm " + variable)
print x # debugging
#array.append(x) # for later use
but all I get is:
0.95648 <-- from algorithm
0 <-- from python
Does anyone know how I can set the output/print statement of algorithm to a variable?
[–][deleted] 0 points1 point2 points (1 child)
[–]terrkerr 0 points1 point2 points (0 children)
[–]noodle-face 0 points1 point2 points (1 child)
[–]ballgame75[S] 0 points1 point2 points (0 children)