[issue35268] Windows 10 asyncio reading continously stdin and stdout Stockfish

2018-12-15 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python

[issue35268] Windows 10 asyncio reading continously stdin and stdout Stockfish

2018-12-15 Thread Cezary Wagner
Cezary Wagner added the comment: It just tested it today and I found in parallel same solution as you suggested. Sometimes it happen even your skilled programmer - at least one time in year :) I was just blind. Let's close it since it is invalid report. I just skipped new line at end of 'uc

[issue35268] Windows 10 asyncio reading continously stdin and stdout Stockfish

2018-12-15 Thread Andrew Svetlov
Andrew Svetlov added the comment: Sorry, the bug tracker is for working on Python bugs, not on bugs of your programs written with Python. The behavior of subprocesses running is tested intensively, scenarios like you described works well. I don't know sockfish protocol but highly likely the

[issue35268] Windows 10 asyncio reading continously stdin and stdout Stockfish

2018-12-15 Thread Cezary Wagner
Cezary Wagner added the comment: Another code try - this time I am using task: import asyncio import sys async def process_line_reader(process, on_line=None, on_eof=None): while not process.stdout.at_eof(): # BUG? after first line it becomes dead line = await process.std

[issue35268] Windows 10 asyncio reading continously stdin and stdout Stockfish

2018-12-15 Thread Cezary Wagner
Cezary Wagner added the comment: See new code example (little changed): It block after first stdout: import asyncio import sys async def run_stockfish(): STOCKFISH_PATH = r'C:\root\chess\stockfish\stockfish 10\stockfish_10_x64_bmi2.exe' stockfish = await asyncio.subprocess.create

[issue35268] Windows 10 asyncio reading continously stdin and stdout Stockfish

2018-12-15 Thread Cezary Wagner
Cezary Wagner added the comment: Stockfish works like that: 1. Run command line and listen stdout. 2. Send some stdin and listen stdin. 3. stdout is asynchronous and continous (there no single output, line is generated every some time). I want to send some stdin than listen stdout response fr