Yes, thanks to all, flush answer seems to work. The thingis that java
println have the flush in the method, that is why it worked.

I will also try -u.

Thanks!!!!!!!!!


2013/4/8 Álvaro Begué <[email protected]>

> Running `python -u' is another workaround.
>
>
>
> On Mon, Apr 8, 2013 at 2:13 PM, Matthew Woodcraft <[email protected]
> > wrote:
>
>> Sebastian Scheib wrote:
>> > I am trying to send commands using GTP protocol in Python, but is not
>> > working.
>> >
>> > In Java I used for example for Name:
>> >
>> > System.out.println("= Evil Tesuji\n\n");
>> >
>> > In Python I am trying with:
>> >
>> > sys.stdout.write("= "+self.param.name+"\n\n")
>> >
>> > and
>> >
>> > print "= "+self.param.name+"\n\n"
>> >
>> > but goGui keeps telling me that the go program is not responding to the
>> > command "name" even if I know the line is executed. Any suggestion?
>>
>> If your engine is communicating over a pipe, then by default sys.stdout
>> is fully-buffered.
>>
>> I suggest adding sys.stdout.flush() after the write.
>>
>> -M-
>> _______________________________________________
>> Computer-go mailing list
>> [email protected]
>> http://dvandva.org/cgi-bin/mailman/listinfo/computer-go
>>
>
>
> _______________________________________________
> Computer-go mailing list
> [email protected]
> http://dvandva.org/cgi-bin/mailman/listinfo/computer-go
>
_______________________________________________
Computer-go mailing list
[email protected]
http://dvandva.org/cgi-bin/mailman/listinfo/computer-go

Reply via email to