Re: [computer-go] GoGui and python

2007-08-27 Thread Thomas Nelson
Thanks to all who replied. This fixed my problem. THN On Fri, 24 Aug 2007, Adrian Petrescu wrote: Yeah, flushing stdout should be all you need to do to make this work. To do this, import sys sys.stdout.flush() Good luck :) ___ computer-go maili

Re: [computer-go] GoGui and python

2007-08-24 Thread Hellwig Geisse
On Fri, 2007-08-24 at 19:11 -0400, George Dahl wrote: > He has two consecutive newlines since print adds one unless the print > statement has a comma at the end. > - George Ah, thanks, didn't know that. I suspected this to be the error because the two newlines in responses are in my experience the

Re: [computer-go] GoGui and python

2007-08-24 Thread George Dahl
He has two consecutive newlines since print adds one unless the print statement has a comma at the end. - George On 8/24/07, Hellwig Geisse <[EMAIL PROTECTED]> wrote: > Thomas, > > On Fri, 2007-08-24 at 17:26 -0500, Thomas Nelson wrote: > > > command = raw_input() > > print "= myName\n" > > the fo

Re: [computer-go] GoGui and python

2007-08-24 Thread Hellwig Geisse
Thomas, On Fri, 2007-08-24 at 17:26 -0500, Thomas Nelson wrote: > command = raw_input() > print "= myName\n" the following is taken directly from the protocol specification: - 2.6 Response Structure If successful, the engine returns

Re: [computer-go] GoGui and python

2007-08-24 Thread Adrian Petrescu
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 <[EMAIL PROTECTED]> wrote: > > > command = raw_input() > > print "= myName\n" > > > > Obviously, this is a toy example, but GoGui responds with "t

Re: [computer-go] GoGui and python

2007-08-24 Thread Darren Cook
> 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 bu

[computer-go] GoGui and python

2007-08-24 Thread Thomas Nelson
Has anyone here tried using GoGui with python? I thought the print statement would send commands well enough, but it doesn't seem to. Here's some very simple code: command = raw_input() print "= myName\n" Obviously, this is a toy example, but GoGui responds with "the program never responde