471,342 Members | 1,826 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,342 software developers and data experts.

Accepting text input using effnet's Console module

chigasakigaijin
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
0 1253

Post your reply

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

Similar topics

1 post views Thread by Scott Shaw | last post: by
14 posts views Thread by Job Lot | last post: by
reply views Thread by Daniel Perron | last post: by
6 posts views Thread by JM | last post: by
11 posts views Thread by Catalin Porancea | last post: by
7 posts views Thread by David A. Osborn | last post: by
7 posts views Thread by Collin | last post: by
3 posts views Thread by tmallen | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.