Hi Blenderers,
I have really tried to find the answer before posting this, please don’t say: “do a search on Python, there’s tons of tutes you moron.”
WinXP-Pro, Blender 2.36, Python 2.3.4 (installed in C:\python23). Win-XP environment variable PYTHONPATH has been set to: C:\PYTHON23;C:\PYTHON23\DLLS;C:\PYTHON23\LIB;C:\PYTHON23\LIB\LIB-TK
I’ve tried this as both a system and a user-specific variable. Rebooting just in case. Within Blender User Prefs, File Paths, Python is set to C:\python23. Ctrl+U to save prefs, and restart blender just in case. When I launch Blender, the console shows no errors. I split my window, open a new text file, type:
import sys
print sys.path
then press Alt+P and the console shows:
['C:\\PYTHON23', 'C:\\PYTHON23\\DLLS', 'C:\\PYTHON23\\LIB', 'C:\\PYTHON23\\LIB\\LIB-TK', 'C:\\Program Files\\Blender Foundation\\Blender\\python23.zip', 'C:\\Program Files\\Blender Foundation\\Blender', 'C:\\PROGRA~1\\BLENDE~1\\Blender', 'C:\\Python23\\lib\\site-packages', 'C:\\Python23', 'C:\\Python23\\lib\\site-packages', 'C:\\python23', 'C:\\Program Files\\Blender Foundation\\Blender\\.blender\\scripts']
But, if I start a new text file and type:
print dir(GameLogic)
then press Alt+P and the console errors with:
Traceback (most recent call last):
File "Text.001", line 5, in ?
NameError: name 'GameLogic' is not defined
If I start a new text file and type:
import GameLogic
then press Alt+P and the console errors with:
Traceback (most recent call last):
File "Text.001", line 5, in ?
ImportError: No module named GameLogic
What other steps must I take to fully “hook-up” Python with Blender?
TIA!
-potus98