O'Reilly logo

Panda3D 1.6 Game Engine by Dave Mathews

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

Chapter 5: Handling Large Programs with Custom Classes

Importing custom classes

Question number

Answer

1

It looks where we tell it to using from.

2

We can use the * wildcard, like so: from file import *

Accessing custom classes from other classes

Question number

Answer

1

By storing a reference to the second class in a variable in the first class.

2

This creates additional references that will have to be deleted to properly clean up the class instance later on.

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