Sublime Forum

How do you make screen appear from sublime on mac using python 3

#1

Im kind of new in sublime. I’m trying to make a screen, but when I type this down the python rocket just jumps on my dock.

import pygame

pygame.init()

WIDTH = 800
HEIGHT = 600

screen = pygame.display.set_mode((WIDTH, 600))

Results:
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html

And then the python rocket starts jumping. How do I make the screen appear?

0 Likes

#2

You have to configure the build system to include the required paths and environment variables for the library you’re using.

0 Likes

#3

How do I do that?

0 Likes

#4

I don’t think that is your issue. When the python program exits all windows are closed. All you’re doing is creating a window, subsequently exiting. You’ll need an event handling loop of some kind, as shown in this article: https://inventwithpython.com/pygame/chapter2.html

0 Likes