From 74a440e2be79cbf9f93837e06ed3e7b4a694503b Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 18 Apr 2015 16:32:14 +0100 Subject: [PATCH] added logging --- SPACE INVADERS.py | 4 +++- textures.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/SPACE INVADERS.py b/SPACE INVADERS.py index 319a71c..74f785d 100644 --- a/SPACE INVADERS.py +++ b/SPACE INVADERS.py @@ -1,2 +1,4 @@ -import pygame +import pygame, logging import bullet, player, textures # Import other files + +logging.basicConfig(format="%(levelname)s:%(message)s", level=logging.DEBUG) \ No newline at end of file diff --git a/textures.py b/textures.py index 6332765..055dd59 100644 --- a/textures.py +++ b/textures.py @@ -1,4 +1,7 @@ import os, pygame, glob +import os, pygame, glob, logging + + class Textures(): def __init__(self): self.images = { @@ -12,7 +15,6 @@ class Textures(): def loadTexturePack(self, packName): if os.path.exists(self.path + packName): targets = glob.glob(self.path+packName+"\\target*.png") - for file in files: fileName = file.split("\\")[-1] if self.pack = packName