BIOS like, interactive menu, for python text based game

I am writing a text based game in python and as you'd expect, it has many questions with multiple answers e.g. yes/no.

I have been been using the usual, input your answer, answering technique, but I was hoping to make it a bit more interactive in answering some options, such as the main menu. I do not want a full on GUI but is there some way to have something similar to, for example, the modern BIOS menu, where you use the arrow keys to navigate, and press enter to select?

Thanks for any reply's, whether it's possible or not!

P.S. I would rather not have to download any plugins etc, because I have to be able to use this at school where I cannot use them.


This is a rather open-ended question (not have to download any "plugins")? But what you want is the curses library, to which Python has an interface with its curses module. The Python docs provide a simple tutorial for using it.

There is also a library called Blessings which provides a nicer, more modern object-oriented interface to curses. I haven't tried it but it's well supported and looks pretty good.

Take a look at the Urwid library:

(I know you'd like to not use an external module, but that means you'll essentially have to reimplement most of CURSES yourself, and that's a road you really don't want to take)

Need Your Help

Capybara: Finding a second checkbox which is identical to the first

ruby-on-rails ruby rspec tdd capybara

I am writing tests for view files. I have a page with two checkboxes which allows the user to Select All items in two different lists. However, the checkboxes are part of a partial so are identical...

Codeigniter file upload - possible to use callbacks? (v2)

javascript codeigniter frameworks upload

Is it possible using the Codeigniter framework to put in some form of callback that will check to see if an uploaded file exists, if so give javascript confirm alert stating 'overwrite'.