> > > ./gobmk_base.linux_x86 --quiet --mode gtp < 13x13.tst > > > > > The only thing I could really think of to try was > > > > > os.execv("./gobmk_base.linux_x86", ["./gobmk_base.linux_x86", > > > "--quiet", "--mode", "gtp", "<", "13x13.tst"]) > > > > > but this apparently doesn't work. Is there some other way to > > > accomplish what I'm going for? > > > > > Thanks, > > > -dan > > > > IIRC, > > > > if os.fork() == 0: > > new_stdin = os.open('13x13.tst') > > os.dup2(new_stdin, sys.stdin.fileno()) > > os.close(new_stdin) > > os.execv("./gobmk_base.linux_x86", ["./gobmk_base.linux_x886", "-- > > quiet", "--mode", "gtp"]) > > Maybe a sys.stdin.flush() just to be sure ? >
Thanks, that did the trick (well, os.open('13x13.tst', os.O_RDONLY), but you know... close enough). -- http://mail.python.org/mailman/listinfo/python-list