how to feed stdin to external process and redirect stdout ? #134
Replies: 5 comments
-
Btw. maybe this better be a Nim question in general ? yet i have no clue about stdin/stdout regarding your widgets. |
Beta Was this translation helpful? Give feedback.
-
It might be worth also asking this on the Nim Forum or the Nim Discord, as it is somewhat at the intersection of a owlkettle / Nim question. The owlkettle specific aspect of this question is probably how to asynchronously read from stdout (while the gui remains interactive). You can achieve with this using threading. |
Beta Was this translation helpful? Give feedback.
-
i looked into |
Beta Was this translation helpful? Give feedback.
-
i'm aware these techniques exist but i'm a simple programmer, i need examples .. then i can change things and learn. Such (a)sync scripts are hard to understand, to me at least .. |
Beta Was this translation helpful? Give feedback.
-
i created a working example now : StefanSalewski/salewski-chess#3 (comment) |
Beta Was this translation helpful? Give feedback.
-
i'm new to Owlkettle but i managed to compile most of your examples into a GUI.
i also have some experience programming Nim, but can't succeed redirecting / catching stdout.
i'm trying to interact with a chess engine binary, but the question is general : how to fill a text widget with such data ?
i found forum entries like :
Redirect stdout for certain execution
https://forum.nim-lang.org/t/6909
..but i can't make those code parts work - can anyone give some basic code, or point me to a working example ?
Beta Was this translation helpful? Give feedback.
All reactions