By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,898 Members | 1,245 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,898 IT Pros & Developers. It's quick & easy.

Accepting text input using effnet's Console module

P: 4
Hi all! This is my first post in this forum. Looking forward to learning alot! I'm still a beginner at Python, but have grasped all the major concepts in "How to Think Like a Computer Scientist." I'm trying to branch out a bit and get some more control over how my console apps are displayed. I don't want to jump into a full-fledged GUI like TkInter just yet, though, so I wanted to see if I could get more control over the Windows Console.

I found the Console module, and knew that this is what I needed. I'm taking a states/capitals text game I built for practice and trying to make it more user-friendly with a simple console-based GUI. I've got the layout parts down, drawing rectangles and putting text where I want it, but for the life of me, I can't figure out how to let a user type something in.

I can place the cursor exactly where I would like the user's text input to appear (right after the text "Your name: ") but keystrokes don't have any effect on the console. Typed text does not appear and even Ctrl-C has no effect on the console window.

I couldn't find anything in the documentation for the Console module about this. There are some events listed, but maybe I just don't understand what they're talking about. Can someone with some experience with the Console module give a newb a hand?
Aug 3 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.