0
import pygame, sys
pygame.init()
image = pygame.image.load("C:\users\USER\Desktop\project\image.png")

how do I left out the C:\users\USER\Desktop and just start with the project folder?

while True:
for evt in pygame.event.get():
   if evt.type == pygame.QUIT:
      pygame.quit()
      sys.exit()
Fredkit
  • 1
  • 1
  • Put the following 2 lines at the begin of your code. Line 1: `import os`, line 2: `os.chdir(os.path.dirname(os.path.abspath(__file__)))`. See [Could not open resource file, pygame error: "FileNotFoundError: No such file or directory."](https://stackoverflow.com/questions/58177145/could-not-open-resource-file-pygame-error-filenotfounderror-no-such-file-or) – Rabbid76 Oct 16 '22 at 16:29

0 Answers0