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 6070099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:53:42+00:00 2026-05-23T09:53:42+00:00

I’m running it through the livewires wrapper which is just training wheels for pygame

  • 0

I’m running it through the livewires wrapper which is just training wheels for pygame and other python modules in general; but everytime I run it, it’ll execute and when I try to exit, it will not respond and then crash.

Any input on how I could go about fixing this would be great. There isn’t any input in my textbook and all google seems to yield are results to this problem using pygame itself.

Apparently pygame and Tkinter seem to conflict?

Thanks in advance!

Addendum – This is the code I was trying to run:

from livewires import games

screen_w = 640
screen_h = 480

my_screen = games.Screen (wid, heit)
my_screen.mainloop()
  • 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-05-23T09:53:43+00:00Added an answer on May 23, 2026 at 9:53 am

    Similar question: Pygame screen freezes when I close it

    There isn’t any input in my textbook
    and all google seems to yield are
    results to this problem using pygame
    itself.

    Those results probably address the same problem you’re having. This is the relevant part of the games.py file from livewires, and nowhere does it call pygame.quit():

    def handle_events (self):
        """
        If you override this method in a subclass of the Screen
        class, you can specify how to handle different kinds of
        events.  However you must handle the quit condition!
        """
        events = pygame.event.get ()
        for event in events:
            if event.type == QUIT:
                self.quit ()
            elif event.type == KEYDOWN:
                self.keypress (event.key)
            elif event.type == MOUSEBUTTONUP:
                self.mouse_up (event.pos, event.button-1)
            elif event.type == MOUSEBUTTONDOWN:
                self.mouse_down (event.pos, event.button-1)
    
    def quit (self):
        """
        Calling this method will stop the main loop from running and
        make the graphics window disappear.
        """
    
        self._exit = 1
    
    def mainloop (self, fps = 50):
        """
        Run the pygame main loop. This will animate the objects on the
        screen and call their tick methods every tick.
    
        fps -- target frame rate
        """
    
        self._exit = 0
    
        while not self._exit:
            self._wait_frame (fps)
    
            for object in self._objects:
                if not object._static:
                    object._erase ()
                    object._dirty = 1
    
            # Take a copy of the _objects list as it may get changed in place.
            for object in self._objects [:]:
                if object._tickable: object._tick ()
    
            self.tick ()
    
            if Screen.got_statics:
                for object in self._objects:
                    if not object._static:
                        for o in object.overlapping_objects ():
                            if o._static and not o._dirty:
                                o._erase ()
                                o._dirty = 1
    
            for object in self._objects:
                if object._dirty:
                    object._draw ()
                    object._dirty = 0
    
            self._update_display()
    
            self.handle_events()
    
        # Throw away any pending events.
        pygame.event.get()
    

    The QUIT event just sets a flag which drops you out of the while loop in the mainloop function. I’m guessing that if you find this file in your Python directory and stick a pygame.quit() after the last line in mainloop, it will solve your problem.

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

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I am currently running into a problem where an element is coming back from
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but

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.