Well, once you initialize pygame and run the pygame loop in startDisplay () in Commands.py, you essentially leave your main () loop in game.py. Therefore, a repeated request for input will not be repeated. If you want to call input during a loop in startDisplay (), you will need to do it right there. As I said above, this will stop your game until you enter a team that is obviously not very good. You can build a little logic around it and only ask for input during a break in action or implement the Pause event (using the key event), which will subsequently trigger an invitation for the team.
source share