mainframetech
Still Fresh
- Joined
- Nov 17, 2015
- Messages
- 2
Hi! I'm new as of today (Monday, 11/16/15)
I have recently downloaded Python 3.5 and also pygames 1.9.2a0 to go with it using pip3.5.exe to download. I tried a simple sample program (colorviewer.py from Andy Harris’ book ‘Game Programming’). The window appears and the color cursors will operate properly, telling me that the event loop is working. However, when closing the window with the ‘X’ at the upper right of the window (the normal ‘close’ command), the program just hangs and does nothing. I tried it with no change to the program, and then added on the line to test pygame.QUIT the K_ESCAPE key and that fails too. I'm running on a large Dell studio machine with 3 gig memory and plenty of disk space. I'm using Windows 7. Any ideas?
Here’s the code:
while keepGoing:
clock.tick(30)
for event in pygame.event.get():
if event.type == pygame.QUIT or event.type == pygame.K_ESCAPE:
keepGoing = False
I’m just beginning to learn Python & pygame, but I’m not a newbie to programming, having been a systems programmer using mainframe assembler and machine code languages for years. I’ve written some Windows ‘C’ as well and generally understand the layout of the PC system in conversation with Windows programs, but this is a new environment for me.
Any help is appreciated,
I have recently downloaded Python 3.5 and also pygames 1.9.2a0 to go with it using pip3.5.exe to download. I tried a simple sample program (colorviewer.py from Andy Harris’ book ‘Game Programming’). The window appears and the color cursors will operate properly, telling me that the event loop is working. However, when closing the window with the ‘X’ at the upper right of the window (the normal ‘close’ command), the program just hangs and does nothing. I tried it with no change to the program, and then added on the line to test pygame.QUIT the K_ESCAPE key and that fails too. I'm running on a large Dell studio machine with 3 gig memory and plenty of disk space. I'm using Windows 7. Any ideas?
Here’s the code:
while keepGoing:
clock.tick(30)
for event in pygame.event.get():
if event.type == pygame.QUIT or event.type == pygame.K_ESCAPE:
keepGoing = False
I’m just beginning to learn Python & pygame, but I’m not a newbie to programming, having been a systems programmer using mainframe assembler and machine code languages for years. I’ve written some Windows ‘C’ as well and generally understand the layout of the PC system in conversation with Windows programs, but this is a new environment for me.
Any help is appreciated,