Python Forum
Having difficulty with threads and input()
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Having difficulty with threads and input()
#5
I like the idea of using pygame since I'm doing my dev on a local windows machine but eventually this script will be deployed to a linux server accessible only via SSH.

https://www.geeksforgeeks.org/how-to-get...in-pygame/

So the best method with pygame would be to use pygame to detect keyboard inputs, and if it detects "x" then "enter" it terminates the script, correct? That method would work on both a remote linux server which I SSH'd into, as well as my local machine?

On my local windows machine, I'm running the python script in powershell. Am I correct I'm assuming that pygame will only detect the input when the powershell is in the foreground? I don't want to be in another application doing stuff and then pygame by happenstance detects the input and then shuts down the script...
Reply


Messages In This Thread
RE: Having difficulty with threads and input() - by sawtooth500 - Jun-04-2024, 08:56 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Difficulty in adapting duplicates-filter in script ledgreve 5 1,087 Jul-17-2023, 03:46 PM
Last Post: ledgreve
  Difficulty with installation standenman 2 1,170 May-03-2023, 06:39 PM
Last Post: snippsat
  Difficulty with installation standenman 0 795 May-02-2023, 08:33 PM
Last Post: standenman
  Difficulty in understanding transpose with a tuple of axis numbers in 3-D new_to_python 0 1,625 Feb-11-2020, 06:03 AM
Last Post: new_to_python
  Difficulty installing Pycrypto KipCarter 4 13,282 Feb-10-2020, 07:54 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020