PNMImage() what to import to get it running? *solved*

Hi! Following the tuts about creating my own textures, I tried to use the line

myImage=PNMImage() 

However, Python/Panda3D starts rioting:

Traceback (most recent call last):
  File "graphics.py", line 9, in ?
    myImage=PNMImage()
NameError: name 'PNMImage' is not defined

What do I need to import when running the stable Panda3D? Or is that a manual part for 1.1 exclusively and only not labeled as such?

Regards, Bigfoot29

Edit: Fixed: Its a DirectGUI element, so you need to import


from direct.gui.DirectGui import *

for example.

Actually, since it’s a C++ class, the correct thing to import is:


from pandac.PandaModules import *

It just happens that importing DirectGui incidentally also imports PandaModules (at the moment).

David