0
votes
0answers
8 views

Pyglet - text input - how to get it's value to a variable?

Is there a relatively simple way of getting text input from the user and store it in variable? Asking for a name via textinput and displaying it on a label for example. I checked out the pyglet ...
1
vote
1answer
28 views

Capturing keyboard input in python as a daemon in Linux

I wanted to know if there were any python modules that allow access to keyboard interrupts non-disruptively. I wanted to make a text-to-speech program, perhaps for the blind programmer out there, and ...
0
votes
1answer
19 views

Enter number inside textbox on website

I'm creating a script for a game because I want to automate a certain part of it. So far I have: import win32api, win32con, time def click(x,y): win32api.SetCursorPos((x,y)) ...
0
votes
1answer
63 views

Manipulating a string to create even chunks of three [on hold]

I am new to Python, and this is probably a very simple question, but I am having trouble figuring it out. I have some raw input that I need to convert. The input is a body of text such as ...
0
votes
1answer
30 views

Multiple input of same variable in a line Python

I am trying to create a loop for python to create a variable of different input values. I want to input 3 different words into the name variable. This is my code: name = raw_input("What is your ...
1
vote
1answer
38 views

Using Python to Collect Historical 30yr Treasury Bond Prices

I am using the website https://www.treasurydirect.gov/GA-FI/FedInvest/selectSecurityPriceDate.htm. This website gives me access to historical bond prices based on the CUSIP number of the bond. I am ...
-2
votes
1answer
31 views

How can I properly add input to a variable?

I'm constructing an email program for a project, and I need the program to accept mostly raw input. For example, in the "msg" section, I need the From:, the To: and where the body section is to be ...
1
vote
1answer
45 views

Faster IO giving slower results in this specific situation

To read in integers fastly I have been using cases = int(next(sys.stdin)) instead of the slower cases = int(sys.stdin.readline()) I have been getting better timing in every problem I used this ...
0
votes
1answer
14 views

Adding values resulting from input() Python3

i know this is a completely noob question, but how can i add the result from a input(), add it and print it? this is the code: import time #valores de definicao da cortina cortinas_cm = 100 ...
1
vote
4answers
65 views

What’s the most Pythonic way of handling different, mutually-exclusive function inputs?

I am trying to find a clean way to handle different, mutually-exclusive function inputs. The idea is that I have a function which returns 4 values (these values are linked through mathematical ...
0
votes
1answer
31 views

Curses print characters as typed

Using python I am wanting to have the characters printed out as i type, but I am not understanding how to use the curses module, this is the code that I tried but it did not work. import curses ...
1
vote
1answer
39 views

How do I print and have user input in a text box in tkinter, Python 3.2.5?

I am completely new to Python, and I just wrote a short bit of code that prints and asks for input in the python shell. It works like a diary where it asks for a date and then prints the entries for ...
2
votes
3answers
63 views

python if user input contains string

Very basic question. We have the code: a = input("how old are you") if a == string: do this if a == integer (a != string): do that Obviously it doesn't work that way. But what is the ...
1
vote
1answer
29 views

Using text inputs in pygame

import tkinter as tk import pygame pygame.init() ss = width, height = 1024, 600 screen = pygame.display.set_mode(ss) tkinput_1 = True while True: event = pygame.event.poll() keys = ...
-1
votes
1answer
26 views

How can I get user input from stdin allowing directory navigation? [closed]

I want to ask the user to provide a file location from stdin. How can I allow the user to navigate through the directory structure while typing? Things like tab for completing directory names... ...

1 2 3 4 5 28
15 30 50 per page