Problemi con l'avvio di Panda3d 1.10.7- x64 con win 10 64 bit

Salve a tutti, sono un neofita e ho problemi con l’avvio di Panda 3d 1.10.7-x64 su win 10- 64
i pacchetto di Panda è installato ma quando vado ad immettere i seguenti valori:

from direct.showbase.Showbase import ShowBase

class MyApp(ShowBase):
def_init_(self):
ShowBase.init(self)

app=MyApp()
app.run()

Mi dice :NameError: name ‘def_init_’ is not defined.
Perchè? Qualcuno può aiutarmi ad avviare Panda 3d?
Grazie anticipatamente

Greetings!

I hope that you’ll forgive that this is in English–I don’t speak Italian (if I’m identifying your language correctly). ^^;

That said, I think that there are two problems here:

  1. There should be a space between “def” and “_”
    and
  2. There should be two "_"s on either side of “init”, instead of just one

That is, it should look something like this:

class MyApp(ShowBase):
    # Note the space here, and the number of "_"s.
    def __init__(self):
        # The rest of the code...

Thank’s Thaumaturge I solved the problem with your help!

1 Like