pygame怎么給圖片設置路?
You should use os.path.join() for compatibility.----from pygame試試pygame.image.load(os.path.join('文件目錄', '文件名'))假如圖片路徑為E:\exercise\Python3.6.0\image.jpg,則可寫:pygame.image.load(os.path.join(r'E:\exercise\Python3.6.0', 'image.jpg'))
pygame怎么給圖片設置路?
You should use os.path.join() for compatibility.----from pygame試試pygame.image.load(os.path.join('文件目錄', '文件名'))假如圖片路徑為E:\exercise\Python3.6.0\image.jpg,則可寫:pygame.image.load(os.path.join(r'E:\exercise\Python3.6.0', 'image.jpg'))