I'm wondering if there's a way to make user edit some input.
I have tried:
sys.stdin.write("Foo bar")
input()
And expected this behaviour:
<< Foo bar
The user will edit the string "Foo bar" (e.g. "Foo bar baz"), press enter and the input
should return the edited string (e.b. "Foo bar baz").
It's something like "editable prompt".
Is there a way to do it?
EDIT: I'm running on OS X, but I would like to support other platforms too.