Panda3D Manual: SPE
  <<prev top next>>     

Installing SPE for use with Panda3D

Since Panda 1.3.0 the windows installer has the option to add panda's python to the registry. If you don't register or if you use an earlier version of panda, SPE cannot detect panda modules. Without them, features like autocomplete, the built-in console, debugger etc. do not work for Panda3D scripts. To correct this, SPE must first be integrated properly with panda's python (ppython-Panda3D's built-in python interpreter)

Integrate it manualy in this order:

1. download and install Panda3D

This installs ppython also. There should now be a directory "\Panda3D-x.x.x" where the x's are the version number.

2. download and install python

This installs the standard python interpreter required by the other installers. There should now be a directory "\Pythonxx" (again, x's are the version number)

This directory can be deleted after step 5 if you wish. (not before!)

3. download and install wxpython

SPE requires wxpython. This installs in "\Pythonxx\Lib\site-packages"

4. download and install SPE

This autodetects the standart python install, and also installs in "\Pythonxx\Lib\site-packages"

5. Manually copy the new files and folders in "\Pythonxx\Lib\site-packages" to "\Panda3D-x.x.x\bin\lib\site-packages"

When SPE is run from the new location using ppython it should have access to all the panda3D modules.

6. Write a script for convenience

e.g. in Windows create a new shortcut with target:

"C:\Panda3D-x.x.x\bin\ppython.exe" "C:\Panda3D-x.x.x\bin\lib\site-packages\_spe\SPE.py"

This is just as easy in Linux using a shell script.

Importing DirectStart

SPE may need to or require you to import DirectStart for its PyDoc generation and calltips. By default this also pops up the main window. This can get annoying, but fortunately opening the window can be easily deferred by either adding the line

window-type none

to your Config.prc file or by adding the line

loadPrcFileData("", "window-type none")

to your script before you import direct.directbase.DirectStart. You may open the window later with the line

base.openMainWindow(type = 'onscreen')

  <<prev top next>>