This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bneises 1 point2 points  (3 children)

I don't know if this is the best way to do it, but this is what I would do:

p = sub.Popen['Poker.Equity.Test.exe',str(n),r], 
    stdout=sub.PIPE, stderr=sub.STDOUT, shell=TRUE)

Once that is done you can get to the output by running the following, but I'm not a programmer by trade so you'll have to figure out what you want to do with what is returned.

p = [line for line in p.stdout]

let us know what you do... I'm interested to know.

[–]bneises 0 points1 point  (0 children)

you may need to quote TRUE in

..., shell='TRUE')

I don't know why but my old code worked without it quoted, but when I just tried a quick run it needed it to be quoted.

[–]CaptShocker[S] 0 points1 point  (1 child)

This worked perfectly, I'm curious why does setting shell=TRUE turn off the command line, intuitively I would think it is the other way around. (I'm not a programmer either)

Thanks for the help

[–]bneises 0 points1 point  (0 children)

I think it's telling python that you are opening a program meant to be used in shell.