The title describes the question pretty much.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
inputfunction, which does the query, does not emit a newline:as you see, the prompt is output without any newline, and what the user types after that appears on the same line as the prompt. Of course, the user is also typing a newline, and (like everything else the user types), that newline is echoed (so further results are on following lines). Is that your problem?
If so, then you need to switch to platform-specific approaches, such as curses on just about any machine except Windows, and msvcrt on Windows (or, you could look for a
cursesport on Windows, but I don’t know if there’s one for Python 3). The two modules are very different, and you haven’t clarified your platform (or your exact needs — my previous paragraph is an attempt at an educated guess;-), so I’ll just wait for you to clarify needs and platforms rather than launching into long essays that may not prove helpful.