Python Forum
[pyGame] Key Event not Working !...
Thread Rating:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[pyGame] Key Event not Working !...
#8
(Sep-29-2017, 08:31 PM)nilamo Wrote: On an unrelated note, also of style, get rid of sys.exit(). There's no reason to import the sys module for this, and calling exit() at the end of your program is redundant.
The sys.exit call is a holdover from running pygame programs with IDLE.  IDLE would often hang if it wasn't included.  It is strictly not necessary, but often included just for safety.
Reply


Messages In This Thread
RE: [pyGame] Key Event not Working !... - by nilamo - Sep-29-2017, 04:33 PM
RE: [pyGame] Key Event not Working !... - by nilamo - Sep-29-2017, 05:50 PM
RE: [pyGame] Key Event not Working !... - by Mekire - Sep-29-2017, 07:43 PM
RE: [pyGame] Key Event not Working !... - by nilamo - Sep-29-2017, 08:31 PM
RE: [pyGame] Key Event not Working !... - by Mekire - Sep-29-2017, 08:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem with pygame.event.clear qq12346 1 2,130 Oct-05-2023, 08:39 AM
Last Post: patriciainman
  [pygame] Inventory items not working SheeppOSU 14 6,800 May-27-2019, 09:44 PM
Last Post: metulburr
  Python Pygame help pause event Trajme 0 3,397 Dec-06-2017, 09:14 PM
Last Post: Trajme

Forum Jump:

User Panel Messages

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