473,513 Members | 2,391 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accepting text input using effnet's Console module

chigasakigaijin
4 New Member
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 1373

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

Similar topics

1
20417
by: Scott Shaw | last post by:
Hi all, I was wondering if you could help out with this problem that I am having. What I am trying to do is detect keyboard input in a while loop without halting/pausing the loop until the key is...
14
4465
by: Job Lot | last post by:
I have tab delimited text file which gets populated on daily basis via automated process. New entry is written at the bottom. I need to create a utility which makes a copy of this file with 10 most...
0
1557
by: Daniel Perron | last post by:
Hi, I was trying to use Galois.Net to specify code generators and I had to look for some text template tool to simplify the syntax. I was looking for something similar to the syntax of an...
6
4694
by: JM | last post by:
Hi, I need a function for a character based program (console) that works exactly like the INKEY$() function in (old) QBasic: Read only 1 keystroke and then move on. Console.Read;...
11
1262
by: Catalin Porancea | last post by:
Hello, I have a txt file that I need to validate before importing in a database. In order to be valid, the file needs to have a header, records and a trailer. How do I read only the first and...
7
6602
by: David A. Osborn | last post by:
I am current writing a console program that takes two file paths as command line input. I get the command line input using the following code: parameter = Split(Command()) input = parameter(0)...
6
1337
by: rh0dium | last post by:
Hi Experts!! I am trying to get the following little snippet to push my data to the function func(). What I would expect to happen is it to print out the contents of a and loglevel. But it's...
7
1659
by: Collin | last post by:
I'm pretty new to Python, but this has really bugged me. I can't find a way around it. The problem is that, when I use raw_input("sajfasjdf") whatever, or input("dsjfadsjfa"), you can only...
3
9569
by: tmallen | last post by:
I'm working on a little FTP project to get comfortable with ftplib. It's all terminal-based right now, and one issue I'm having is hiding password input text. I'd like one of two things to happen...
0
7265
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7545
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5692
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5095
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4751
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3240
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1605
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
461
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.