How to avoid global screen variable?
This question is being asked in the context of Pygame, but I have wondered about a good solution for any sort of graphics programming.

So, whenever you write a graphics program there is usually a screen variable holding the data for the screen being displayed. All the examples I have seen make this variable global so that all other objects have easy access too it such as in the simple example below.

    import pygame

    background_colour = (255,255,255)
    (width, height) = (300, 200)

    class Particle:
        def __init__(self, (x, y), size):
            self.x = x
            self.y = y
            self.size = size
            self.colour = (0, 0, 255)
            self.thickness = 1

        def display(self):
            pygame.draw.circle(screen, self.colour, (self.x, self.y), self.size, self.thickness)

    screen = pygame.display.set_mode((width, height))
    pygame.display.set_caption('Tutorial 2')
    screen.fill(background_colour)

    my_first_particle = Particle((150, 50), 15)
    my_first_particle.display()

    pygame.display.flip()

    running = True
    while running:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                running = False

My question is whether there is a better way of doing this so that the screen isn't global. Thanks!
How to avoid global screen variable?
===

This question is being asked in the context of Pygame, but I have wondered about a good solution for any sort of graphics programming.

So, whenever you write a graphics program there is usually a screen variable holding the data for the screen being displayed. All the examples I have seen make this variable global so that all other objects have easy access too it such as in the simple example below.

    import pygame

    background_colour = (255,255,255)
    (width, height) = (300, 200)

    class Particle:
        def __init__(self, (x, y), size):
            self.x = x
            self.y = y
            self.size = size
            self.colour = (0, 0, 255)
            self.thickness = 1

        def display(self):
            pygame.draw.circle(screen, self.colour, (self.x, self.y), self.size, self.thickness)

    screen = pygame.display.set_mode((width, height))
    pygame.display.set_caption('Tutorial 2')
    screen.fill(background_colour)

    my_first_particle = Particle((150, 50), 15)
    my_first_particle.display()

    pygame.display.flip()

    running = True
    while running:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                running = False

My question is whether there is a better way of doing this so that the screen isn't global. Thanks!