Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8963589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:23:32+00:00 2026-06-15T16:23:32+00:00

I was doing a small experiment with Python in my new win8 install and

  • 0

I was doing a small experiment with Python in my new win8 install and found the following issue:

Code:

import pygame, sys

screen = pygame.display.set_mode([1280,960])
myball=pygame.image.load("Globe.png")
screen.blit(myball, [576, 416])
pygame.display.flip()
while 1:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            sys.exit

However when I hit the ‘X’ button on the pygame window nothing happens. Is this just a win8 issue or not?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:23:33+00:00Added an answer on June 15, 2026 at 4:23 pm

    The general practice is to also call pygame.quit() when looking to exit the program. See below:

    while True:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                pygame.quit()
                sys.exit()
    

    EDIT – also this is probably not a complete copy/paste of your code, but if your code literally just says sys.exit without the () it is not a function call 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing a small app in Excel, and I have the following code when
I'm doing small AJAX searchbar with new google.search.WebSearch(); from Google AJAX Api. How do
Doing a small project I have received some Java code that I should rewrite
I am doing a small program to help me with learning Python (which I
I'm very new to JS and I'm doing a small html page that -for
i doing a small project in django by using python. In that admin can
Currently I am doing a small code in symfony that will cause url have
i was doing a small weekend project, kind of a music player, in python
We are doing small database maintenance work to earn some money. A new client
I am doing small Silverlight app which will allow users to Create orders. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.