image loading

I am trying to get an image to load but it an error come up whenever I try. the error is "pygame.error: Couldn't open data\menu.bmp" This is my code:

import pygame, sys
from pygame.locals import *
pygame.init()
Surface = pygame.display.set_mode((600, 450), 0, 32)
menuimage = pygame.image.load("data\\menu.bmp")
menu = pygame.image.load(menuimage)
Surface.blit(menu, (50, 50))

how can I get it to work?

(log in to comment)

Comments

I'm not 100% certain what the problem is, but I can make a few recommendations.  I usually use PNG for images; maybe PyGame doesn't like bitmaps?  Also I think Skellington has a function to help with file paths; you could try using that.

Something I just noticed while looking at your code.  You seem to be loading an image into 'menuimage' then trying to use that menuimage surface to load 'menu'.  I don't think you meant to do that as menuimage would not be a file path.
Also, be sure to not use \ as the folder delimiter as this will not work for linux/mac users. Use os.sep instead. 
*os.path.sep
The slightly more readable way is to say os.path.join("data", "menu.bmp") instead.
Both os.sep and os.path.sep are valid. os.path.join works, too. 
Cody, please avoid bmp, it's an useless picture format...
My bad, blakeohare - I didn't realize!