[computer-go] GoGui and python

Adrian Petrescu apetresc at uwaterloo.ca
Fri Aug 24 15:54:05 PDT 2007


Yeah, flushing stdout should be all you need to do to make this work. To do
this,

import sys
sys.stdout.flush()


Good luck :)

On 8/24/07, Darren Cook <darren at dcook.org> wrote:
>
> > command = raw_input()
> > print "= myName\n"
> >
> > Obviously, this is a toy example, but GoGui responds with "the program
> > never responded to the name command".  If I write out to a file, I can
> > see my response just fine.
>
> Have you tried flushing stdout after print? (or setting up stdout to not
> buffer?). A quick google confirmed python is buffering stdout, but I
> couldn't find the flush command.
>
> Darren
>
>
> --
> Darren Cook
> http://dcook.org/mlsn/ (English-Japanese-German-Chinese free dictionary)
> http://dcook.org/work/ (About me and my work)
> http://dcook.org/work/charts/  (My flash charting demos)
> _______________________________________________
> computer-go mailing list
> computer-go at computer-go.org
> http://www.computer-go.org/mailman/listinfo/computer-go/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://computer-go.org/pipermail/computer-go/attachments/20070824/ab4ba737/attachment.htm


More information about the computer-go mailing list