The raw input API provides a stable and robust way for applications to accept raw input from any HID (Human Interface Devices), including the keyboard and mouse.
Questions tagged [raw-input]
623 questions
-1
votes
2 answers
How to check raw_input answers inside if-statements
I'm sorry as this is probably a dumb question, but I'm just beginning to learn to code Python and I'm trying to make a game that checks certain inputs from the users. The script, however, is not accepting the correct answer and running the next…

Codezilla
- 95
- 1
- 7
-1
votes
1 answer
Random None when printing from raw_input
I am new to coding I recently made a Decimal to Binary and Binary to Decimal Translator and I am wanting the text for the raw_input to type out one letter at a time like a typewriter, but I am getting after a None after it is done because function…

Kevin Shannon
- 35
- 5
-1
votes
2 answers
"None" output after raw_input in Python 2.7 bug
This is a part of a text adventure that I am working on. It works fine until the user inputs any button to start, and then it prints "None". I was wondering if there was a simple way that I either am overlooking or do not know yet to prevent it from…

Brendan8497
- 29
- 4
-1
votes
2 answers
Python code doesn't run with [input]
I am a complete noob in python and in programming, so I'm sure this question it may irritate some, so I am reading this book which has this example which it does not run with out raw_input
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Filename:…
-1
votes
1 answer
How to check if raw_input is float and contains only one decimal point?
Code:
x=raw_input("Enter: ")
if x.isfloat():
print x
else:
print "error"
Error:
Traceback (most recent call last):
File "C:/Python27/DLLs/delete", line 4, in
if not x.isNumber():
AttributeError: 'str' object has no attribute…

Adrian F
- 13
- 2
-1
votes
1 answer
get raw_input data from main
I'm new in python and have not much experience in programming also.
I have this code in my main file:
def user_input():
import re
name_check = re.compile(r"[^A-Za-z\s. ]")
print("Please enter name input: ")
name = raw_input("> ")
…

Yupo
- 3
- 2
-1
votes
2 answers
Error using OS module with raw_input
I have wrote the following code:
import os
def a():
take = raw_input("insert: ")
os.system("ifconfig eth0 hw ether %d") %take
a()
i get an error that unsupported operand type(s) for %: 'int' and 'str'.
how can i make it work and get the…

user3091216
- 85
- 2
- 3
- 13
-1
votes
1 answer
How to use windows raw input in OpenSceneGraph?
I want to use windows raw input to enable two mice input on one computer.
However, I failed to figure out how to get the WM_INPUT message. It seems to get the message, I need to do this:
MainWndProc (HWND hwnd, UINT nMsg, WPARAM wParam, LPARAM…

lightrek
- 951
- 3
- 14
- 30
-1
votes
1 answer
How to lookup multiple dictionary items with a list
I have the following code that gets a list of strings as a raw_input from the user:
def Lookup(Dict_list):
print 'Please enter one alias per line. Leave blank when finished.'
user_alias = [alias for alias in iter (raw_input, '') ]
print…

gigawatts
- 319
- 2
- 5
- 15
-1
votes
2 answers
if raw_input (includes) x, then print y
a = raw_input 'type x here and see what happens'
if a (INCLUDES) 'x'
print 'y'
What's that INCLUDES command? Is there a better way around this?
I am a fan of the web comic Homestuck, in which trolls each have a different way of typing,…

Westley Twain
- 7
- 3
-2
votes
0 answers
Get Caps lock, nums lock and scroll lock state in raw input win32 for each keyboard individually
I am using raw input for keyboard input to differentiate between keyboards (a local co-op multi player game where each player can connect their own keyboard). But when the game starts up I am having a hard time trying to detect which keyboard has…

yosmo78
- 489
- 4
- 13
-2
votes
1 answer
Beginner phyton coder here, why is my function not working properly?
number = raw_input("Enter a number.")
def function(number):
if number % 9 == 0:
print 9
else:
print number % 9
I get the following when trying to run it:
Enter a number.Traceback (most recent call last):
File "script.py", line 1, in…

Jill and Jill
- 39
- 3
-2
votes
2 answers
python raw_input and input
Are raw_input and input the same? Because when I am coding in python I cannot use raw_input it takes up some error.

Smooth Electric
- 1
- 1
-2
votes
2 answers
raw_input A = 10, if A == 10 giving false: Python
A = raw_input("5 + 5 =")
if A == 10:
print "$"
elif A <> 10:
print "!"
when I input 10 I also get "!" why?

WildFire
- 79
- 1
- 9
-2
votes
1 answer
How i over come with name error in python
i wrote following code but during run its gives name error in 'raw_input' please help me to out of this
my code is:fname = raw_input('enter a file name: ')
print (fname)
Error is= name error:name 'raw_input'is not define

psw
- 45
- 1
- 9