tags:

views:

57

answers:

3

Hi all

I am reading a book about python. There is a sample. The first line is:

import media

I am trying to do the same, but the error like below

Traceback (most recent call last):
  File "<pyshell#6>", line 1, in <module>
    import media
ImportError: No module named media

I want to know, is the media a default library?

Best Regards,

+1  A: 

Absolutely not.

Ignacio Vazquez-Abrams
+3  A: 

Looks like you're using this book (mentioning it specifically would have made it easier to identify than just saying "a book", BTW;-). Per this thread, you need to install some modules as documented here, and possibly the pygraphics package. Doesn't the book itself explain that, in an introduction or maybe in an appendix?

Alex Martelli
Reading is hard (oh the irony...).
Ignacio Vazquez-Abrams
A: 

http://code.google.com/p/pygraphics/wiki/MacInstall

PyGraphics (which includes the 'media' module) installs via the package included with the code for the Practical Programming book but isn't currently usable on OSX 10.6 Snow Leopard

gyaresu