Python HELP ?! Tags: Programming Python Computers Macintosh Apps Last response: August 12, 2010 6:09 PM in Applications Share ben52646 August 10, 2010 8:57:32 PM I am very new to python. How do I located a file on my computer (Mac) in a python program. Here is the program I am trying to run (I know its not done yet): bif="bg.jpg" mif="ball.png" import pygame, sys from pygame.locals import * pygame.init() screen=pygame.display.set_mode ((420,280),0,32) backround= pygame.image.load(bif).convert() mouse_c= pygame.image.load(mif).convert_alpha() while True: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() screen.blit(backround, (0,0)) This is the error I get when I try to run it: Traceback (most recent call last): File "/Users/Ben/Desktop/Python/Game", line 10, in backround=pygame.image.load(bif).convert() error: Couldn't open bg.jpg How to put in the location (on my computer) for "bif" and "mif"? Keep in mind I am using a mac. Thanks, Ben More about : python kyeana a b L Programming August 12, 2010 6:09:24 PM I think you could do the full link to those files and have it work, something along the lines of bif="/home/username/pictures/bg.jpg" (Not sure if that is how the filepaths look for macs, as i don't own one. It is valid for linux though, so mac is probably failry similar) Good luck m 0 l Can't find your answer ? Ask ! Publish Related resources SolvedHow to add color into your program on python 2.7.5??? i am a beginner help! Forum Python22 - is it necessary or even helpful? Forum SolvedNeed a tutorial for learning to make games in python ( No prior programming experience! ) Forum SolvedIs it worth learning Python? Forum SolvedPython Invalid Syntax Error. Forum SolvedC++, C#, Java, and Python Forum I want to install a php and python based script in the webserver Forum i5 enough for basic math programming using VB, Python, Lazarus, LMC Forum SolvedBest python compiler Forum Python Image Loading Problem Forum python coding problem Forum SolvedDoes Python make use of Quad Core CPU? Forum What is the best material to learn python 3.3? Forum Monty Python Games on Windows 7 64 bit Forum Python: Reading from file, strings never equal Forum Top Resources for Learning Python??? Forum New laptop for commuting python developer Forum Starting with Python Forum Python problem Forum Python for first time... Forum More resources Read discussions in other Applications categories Graphics Internet Applications Multimedia Office Security CAD Distributed Computing Drivers Enterprise Software Firmware Programming Photoshop Skype Wordpress !