stdout.write "> "
There is also the rdstdin module: http://nim-lang.org/rdstdin.html
import rdstdin
let x = readLineFromStdin "> "
import os
stdout.write "> "
let stringToEval = readLine(stdin)
echo stringToEval
This doesn't work when I have to do: messageFlowVar = spawn stdin.readLine()
I also tried: messageFlowVar = spawn readLineFromStdin "> "
any idea?
#maybe try this:
import threadpool
var messageFlowVar = spawn stdin.readLine()
stdout.write "> "
var s = ^messageFlowVar
echo "you wrote: ", s