Hey guys. I know this is probably a really simple problem, but I googled it and found things, but nothing that answered this.
My main chunk of my program is in a big loop. I want to make it so if I hit a key, say, 'q', it will break from the loop and go elsewhere (basically, this is because as it is right now, it prints the data to file after the loop is done, so if I decide I want to cancel the run, I lose all the data I have so far. I'd like to make it so I can quit and let the program close itself, after writing the data to a file).
but it doesn't do what I need it to. That (above) waits for input from the user, though immediately acts on the input, without waiting for enter. However, it still WAITS for input. I need something that doesn't wait for it, just acts if it gets it.