O'Reilly logo

Python Multimedia Beginner's Guide by Ninad Sathaye

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - drive on a rainy day!

It's time to write the code for this animation.

  1. Download the Python source file RainyDayAnimation.py. We will discuss some of the important methods from this file. You can go through the rest of the code from this file.
  2. Download the image files, droplet.png, cloud.png, car.png, and lightening.png from the Packt website. Place these image files in a sub-directory called images. The images directory should be placed in the directory where the Python source file is located.
  3. The constructor of the class is written as follows:
    1 def __init__(self, width=None, height=None): 2 pyglet.window.Window.__init__(self, 3 width=width, 4 height=height, 5 resizable=True) 6 self.drawableObjects = [] 7 self.paused = False 8 9 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required