__dev__ symbol not defined??

Hi folks,

I tried out the sample code in discourse.panda3d.org/viewtopic.php … iveconsole

When I try to run the example i get the attached error (see below). Normally I’m quite fine to tune the samples to be able to work with the current panda version but “dev” looks like something quite development internal stuff.

I’m running Panda 1.3.2 on WindowsXP, as supplied by the Windows installer.

Kind regards,

Warning: DirectNotify: category 'Interval' already exists
I: pandaInteractiveConsole.__init__
I:  - GUI enabled
Traceback (most recent call last):
  File "testInteractiveConsole.py", line 192, in ?
    console = pandaInteractiveConsole(locals(),GUI)
  File "testInteractiveConsole.py", line 50, in __init__
    , frameSize = (-1/SCALE, 1/SCALE, top, bottom))
  File "C:\Panda3D-1.3.2\direct\src\gui\DirectFrame.py", line 44, in __init__
    DirectGuiWidget.__init__(self, parent)
  File "C:\Panda3D-1.3.2\direct\src\gui\DirectGuiBase.py", line 719, in __init__
    if __dev__:
NameError: global name '__dev__' is not defined

The dev symbol is defined in the builtins namespace at the time that DirectStart is imported. Probably you just need to ensure that you import DirectStart before you do anything else, like this:

from direct.directbase import DirectStart


Hi David,

with your addition the “interactive console working example” works with the current panda version. Cool!