raw-input Questions

6

Solved

i know i can do this to get the effect of tab completion in python sure. import readline COMMANDS = ['extra', 'extension', 'stuff', 'errors', 'email', 'foobar', 'foo'] def complete(text, state)...
Adjoint asked 12/4, 2011 at 14:44

9

Solved

I'm doing ex13 from Learn Python The Hard Way I'm trying to pass: python ex13.py raw_input() raw_input() raw_input() my code is below: from sys import argv script, first, second, third = arg...
Curie asked 4/9, 2014 at 21:25

2

Solved

I've got two keyboards attached to my computer. A normal full-size keyboard and a numeric keypad. I want to "remap" the keys on the numeric keypad, but leave the full keyboard alone. So, when the u...
Yim asked 6/12, 2012 at 11:26

7

Solved

in python, is there a way to, while waiting for a user input, count time so that after, say 30 seconds, the raw_input() function is automatically skipped?
Conakry asked 29/5, 2010 at 1:30

6

Solved

I am trying to mask what the user types into IDLE with asterisks so people around them can't see what they're typing/have typed in. I'm using basic raw input to collect what they type. key =...
Odessa asked 24/12, 2014 at 4:46

2

Solved

We have a 3m microtouch display. It's connected to my Debian system via USB and recognized as human interface (hid). I am trying to access and push realtime information... if its getting touched I ...
Toile asked 3/3, 2015 at 20:16

1

Solved

I'm trying to get the name of a pressed key with GetKeyNameText, using the make/scan code and extended-key flag given by raw input: std::wstring GetKeyName(const RAWKEYBOARD& info) { WCHAR n[1...
Horick asked 8/11, 2019 at 4:26

2

I'm new to python and i'm trying to install win32clipboard to be able to use this code: import win32clipboard win32clipboard.OpenClipboard() win32clipboard.SetClipboardText('testing 123') win32cli...
Na asked 9/3, 2013 at 11:25

7

I'm using Python 2.7's raw_input to read from stdin. I want to let the user change a given default string. Code: i = raw_input("Please enter name:") Console: Please enter name: Jack The use...
Anchylose asked 23/3, 2011 at 9:30

4

Solved

Though I like python very much, When I need to get multiple integer inputs in the same line, I prefer C/C++. If I use python, I use: a = map(int, raw_input().split()) Is this the only way or is ...
Mahaffey asked 15/6, 2013 at 8:35

5

Solved

Is there a method that I can use to check if a raw_input is an integer? I found this method after researching in the web: print isinstance(raw_input("number: ")), int) but when I run it and in...
Thermoluminescent asked 18/10, 2013 at 3:7

1

Solved

How can I bring python to only output directories via os.listdir, while specifying which directory to list via raw_input? What I have: file_to_search = raw_input("which file to search?\n&gt...
Fibrinolysin asked 24/8, 2017 at 21:11

6

I would like to set a user prompt with the following question: save_flag is not set to 1; data will not be saved. Press enter to continue. input() works in python3 but not python2. raw_i...
Slur asked 12/2, 2014 at 14:40

6

Solved

unfortunately raw_input is not doing what I need it to do. What I am trying to do is get totPrimes = whatever I type in at the prompt. If i replace while count < totPrimes with while count...
Olcott asked 23/4, 2011 at 7:34

4

Solved

I was wondering if anyone has suggestions for writing a backwards-compatible input() call for retrieving a filepath? In Python 2.x, raw_input worked fine for input like /path/to/file. Using input ...
Worlock asked 3/5, 2011 at 11:5

4

I have the following code fragment: def database(self): databasename="" host="" user="" password="" try: self.fp=file("detailing.dat","rb") except IOError: self.fp=file("detailing.dat","wb...
Lorislorita asked 31/3, 2009 at 13:12

2

Solved

I'm trying to learn asyncore module. So I decided to develop a chat program. I have to listen the network and broadcast udp packages same time. But problem is while user typing a message, user cann...
Dieback asked 5/9, 2011 at 21:42

1

Solved

Is there a way to determine whether the keyboard or mouse events are triggered from a hardware rather than an application like TeamViewer, Steam or some other remote desktop software in a desktop a...
Jacobian asked 24/5, 2016 at 10:55

4

Solved

So I am taking raw_input as an input for some list. x= raw_input() Where I input 1 2 3 4 How will I convert it into a list of integers if I am inputting only numbers?
Ludlow asked 12/4, 2014 at 5:5

1

I'm a seventh grade programmer so I may be missing a lot of things in this program, but for my coding club my instructor asked us to make a guess the number game. I have very limited knowledg...
Motheaten asked 3/2, 2016 at 4:26

6

I'm trying to create a looping python function which performs a task and prompts the user for a response and if the user does not respond in the given time the sequence will repeat. This is loosel...
Stoffel asked 24/8, 2015 at 23:43

2

This piece of code is too long in the editor and requires me to scroll to see it. How can I break the code down into multiple lines? review = raw_input('If the secret number is too high enter h, ...
Origami asked 19/8, 2015 at 17:54

2

The function readline in R is similar to raw_input in python, both allow to pass interactive arguments. However, when I run a R script in terminal, It does not work. Here is a example txt.R: #!/...
Implausibility asked 9/3, 2015 at 5:14

2

Solved

Usually, when raw_input asks you to type something in and press Return, feedback is printed on a new line. How can I print over the prompt's line? Could a CR work in this case? Demo: prompt = "Qu...
Heptamerous asked 4/12, 2014 at 21:6

1

Solved

I Learn Python From "Learn Python the Hard way" I don't know what is argv !! (please explain argv with Example and text) Question 2: What is Different between raw_input & argv ?
Upside asked 30/8, 2014 at 9:12

© 2022 - 2024 — McMap. All rights reserved.