[airboat:Programming/Pythons/PlantLand.activity] bcbc% python run.py
2009-09-11 13:50:41.219 Python[781:607] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
Traceback (most recent call last):
File "run.py", line 10, in <module>
world.run(40,True)
File "/Users/bcbc/Desktop/Programming/Pythons/PlantLand.activity/world.py", line 11, in run
font = pygame.font.SysFont(default_font, 24)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pygame/sysfont.py", line 555, in SysFont
initsysfonts()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pygame/sysfont.py", line 522, in initsysfonts
fonts = initsysfonts_darwin()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pygame/sysfont.py", line 422, in initsysfonts_darwin
_search_osx_font_paths(fonts)
UnboundLocalError: local variable 'fonts' referenced before assignment
def run(framerate,doCrossfade):
pygame.init()
screen = pygame.display.set_mode(DISPLAY_SIZE, 0, 32)
startSurface = pygame.Surface(DISPLAY_SIZE, 0, depth=32)
endSurface = pygame.Surface(DISPLAY_SIZE, 0, depth=32)
default_font = pygame.font.get_default_font()
font = pygame.font.SysFont(default_font, 24)
So it looks like default_font is getting set, but then pygame.font.SysFont(default_font,24) is failing deep inside the works somewhere.