Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python console, better than raw_input(), how to offer editable default values?

raw_input (prompt_string) can prompt to input. How to offer default value? And how to make the default value user editable?

like image 412
Andrew_1510 Avatar asked Jul 28 '26 06:07

Andrew_1510


1 Answers

I suggest looking into readline / pyreadline, or even possibly curses.

like image 131
John Paulett Avatar answered Jul 29 '26 19:07

John Paulett



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!