Pygame... first tutorial help!
Oh yeah, that helps. Thank you. I used to know Dos, but it's been years. Thanks for the great refresher course!
I still can't load the monkey bitmap within IDLE. I tried typing in C:\Python25\data\chimp.bmp...but I get a "syntax error" message that points to the colon.
Thanks again for your help.
Thanks again for your help.
Can anyone help me with loading this image within Python Shell? My path should be C:\Python25\examples\data\chimp.bmp
Why won't the image load? I create a relative pathname with: monkey-head-file-name = os.path.join("data","chimp.bmp")
Then, I do: monkey_surface = pygame.image.load(monkey_head_file_name)
I can see that the M_H_F_N variable doesn't contain the whole path...so why would the image load?....Ok, so what am I missing?
Why won't the image load? I create a relative pathname with: monkey-head-file-name = os.path.join("data","chimp.bmp")
Then, I do: monkey_surface = pygame.image.load(monkey_head_file_name)
I can see that the M_H_F_N variable doesn't contain the whole path...so why would the image load?....Ok, so what am I missing?
Quote:Original post by cherokee596
I still can't load the monkey bitmap within IDLE. I tried typing in C:\Python25\data\chimp.bmp...but I get a "syntax error" message that points to the colon.
Thanks again for your help.
Don't forget the quotes around the "C:\Python25\data\chimp.bmp". Whenever you have a string literal (ie: a part of your code that is not code, but is rather plain-old text, for example, in print "Hello, world", notice how Hello, world is in quotes since it's text, not code) it must be surrounded by either quotes or single quotes.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement