Any idea why it doesn't work?
This is the first time I play with Python.
Am I supposed to use a generic text editor to edit the sources, or is
there an IDE or an environment that helps with the editing and
debugging?
Thanks,
Stefano
As far as editing Python files, there are IDEs that do it, but IMO the
easiest thing to do is to use a regular text editor with syntax
highlighting. On Windows, I use notepad++. One caveat with Python is
that it is indentation-sensitive, so you can't mix tabs and spaces. We
use four spaces per indent level in all of our files.
2011-Dec-05 20:31:51.358502 (M) [scripting] scripting engine
initialized
2011-Dec-05 20:31:51.364503 (M) Ignoring messages of type: game
2011-Dec-05 20:31:51.368503 (M) Ignoring messages of type: ai.tick
2011-Dec-05 20:31:51.372503 (M) Starting OpenNero
2011-Dec-05 20:31:57.502854 (M) [ai] AI Engine disabled
2011-Dec-05 20:31:57.507854 (M) [scripting] scripting engine
initialized
2011-Dec-05 20:31:57.662863 (M) [render] Added terrain with heightmap:
data/terrain/terrain-heightmap-flat.bmp
2011-Dec-05 20:31:57.670863 (M) [render] Dim: (960, 0, 960)
2011-Dec-05 20:31:57.675864 (M) [render] Volume: 0
2011-Dec-05 20:31:57.772869 (M) [python] Creating TowerMod
2011-Dec-05 20:31:57.778869 (M) [render] Loaded animated mesh data/
shapes/cube/white_cube.obj with custom scale (2 2 2)
2011-Dec-05 20:31:57.787870 (M) [render] Dim: (4, 4, 4)
2011-Dec-05 20:31:57.792870 (M) [render] Volume: 64
2011-Dec-05 20:31:57.797871 (M) [python] CreateGui
2011-Dec-05 20:31:57.802871 (M) [python] Speedup set to 0
2011-Dec-05 20:31:57.806871 (M) [python] Speedup set to 0.0
2011-Dec-05 20:32:15.144863 (M) [python] Starting Problem reduction
2011-Dec-05 20:32:15.149863 (M) [ai] AI Engine disabled
2011-Dec-05 20:32:15.152863 (M) [python] CLEANUP
2011-Dec-05 20:32:15.256869 (M) [render] Loaded animated mesh data/
shapes/steve/steve_red_unarmed.md2 with custom scale (0.2 0.2 0.2)
2011-Dec-05 20:32:15.266870 (M) [render] Dim: (2.61202, 3.00653,
1.63514)
2011-Dec-05 20:32:15.271870 (M) [render] Volume: 12.841
2011-Dec-05 20:32:15.276870 (M) [ai] AI Engine enabled
2011-Dec-05 20:32:16.005912 (M) [python] Traceback (most recent call
last):
File "C:\OpenNERO\BlocksTower\agent.py", line 96, in start
self.display_planner()
File "C:\OpenNERO\BlocksTower\agent.py", line 79, in display_planner
subproc = subprocess.Popen(['python', 'BlocksTower/
recursive_solver.py'], stdout=subprocess.PIPE)
File "C:\Python27\Lib\subprocess.py", line 679, in __init__
errread, errwrite)
File "C:\Python27\Lib\subprocess.py", line 893, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
2011-Dec-05 20:32:16.055915 (M) [render] Loaded animated mesh data/
shapes/cube/blue_cube.obj with custom scale (1 1 1)
2011-Dec-05 20:32:16.069916 (M) [render] Dim: (2, 2, 2)
2011-Dec-05 20:32:16.073916 (M) [render] Volume: 8
2011-Dec-05 20:32:16.080916 (M) [render] Loaded animated mesh data/
shapes/cube/green_cube.obj with custom scale (1 1 1)
2011-Dec-05 20:32:16.090917 (M) [render] Dim: (2, 2, 2)
2011-Dec-05 20:32:16.094917 (M) [render] Volume: 8
2011-Dec-05 20:32:16.101917 (M) [render] Loaded animated mesh data/
shapes/cube/yellow_cube.obj with custom scale (1 1 1)
2011-Dec-05 20:32:16.111918 (M) [render] Dim: (2, 2, 2)
2011-Dec-05 20:32:16.117918 (M) [render] Volume: 8
2011-Dec-05 20:32:16.122919 (M) [python] Initialized TowerEnvironment
2011-Dec-05 20:32:16.127919 (M) [python] init_rot: 0 0 0 <class
'OpenNero.Vector3f'>
2011-Dec-05 20:34:02.516004 (M) [python] Deleting TowerMod
2011-Dec-05 20:34:02.522004 (M) [ai] AI Engine disabled
2011-Dec-05 20:34:02.526005 (M) [python] CLEANUP
2011-Dec-05 20:34:02.532005 (M) [scripting] scripting engine
initialized
2011-Dec-05 20:34:07.510290 (M) [ai] AI Engine disabled
2011-Dec-05 20:34:07.515290 (M) [scripting] scripting engine
initialized
2011-Dec-05 20:34:07.649298 (M) [render] Added terrain with heightmap:
data/terrain/terrain-heightmap-flat.bmp
2011-Dec-05 20:34:07.657298 (M) [render] Dim: (960, 0, 960)
2011-Dec-05 20:34:07.661298 (M) [render] Volume: 0
2011-Dec-05 20:34:07.667299 (M) [python] Creating TowerMod
2011-Dec-05 20:34:07.672299 (M) [render] Loaded animated mesh data/
shapes/cube/white_cube.obj with custom scale (2 2 2)
2011-Dec-05 20:34:07.681299 (M) [render] Dim: (4, 4, 4)
2011-Dec-05 20:34:07.686300 (M) [render] Volume: 64
2011-Dec-05 20:34:07.691300 (M) [python] CreateGui
2011-Dec-05 20:34:07.696300 (M) [python] Speedup set to 0
2011-Dec-05 20:34:07.699300 (M) [python] Speedup set to 0.0
2011-Dec-05 20:34:30.148585 (M) [python] Starting Problem reduction
2011-Dec-05 20:34:30.152585 (M) [ai] AI Engine disabled
2011-Dec-05 20:34:30.156585 (M) [python] CLEANUP
2011-Dec-05 20:34:30.162585 (M) [render] Loaded animated mesh data/
shapes/steve/steve_red_unarmed.md2 with custom scale (0.2 0.2 0.2)
2011-Dec-05 20:34:30.172586 (M) [render] Dim: (2.67086, 3.60136,
2.10188)
2011-Dec-05 20:34:30.177586 (M) [render] Volume: 20.2174
2011-Dec-05 20:34:30.183587 (M) [ai] AI Engine enabled
2011-Dec-05 20:34:30.586610 (M) [python] Traceback (most recent call
last):
File "C:\OpenNERO\BlocksTower\agent.py", line 96, in start
self.display_planner()
File "C:\OpenNERO\BlocksTower\agent.py", line 79, in display_planner
subproc = subprocess.Popen(['python', 'BlocksTower/
recursive_solver.py'], stdout=subprocess.PIPE)
File "C:\Python27\Lib\subprocess.py", line 679, in __init__
errread, errwrite)
File "C:\Python27\Lib\subprocess.py", line 893, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
2011-Dec-05 20:34:30.632612 (M) [render] Loaded animated mesh data/
shapes/cube/blue_cube.obj with custom scale (1 1 1)
2011-Dec-05 20:34:30.640613 (M) [render] Dim: (2, 2, 2)
2011-Dec-05 20:34:30.645613 (M) [render] Volume: 8
2011-Dec-05 20:34:30.651613 (M) [render] Loaded animated mesh data/
shapes/cube/green_cube.obj with custom scale (1 1 1)
2011-Dec-05 20:34:30.660614 (M) [render] Dim: (2, 2, 2)
2011-Dec-05 20:34:30.664614 (M) [render] Volume: 8
2011-Dec-05 20:34:30.670614 (M) [render] Loaded animated mesh data/
shapes/cube/yellow_cube.obj with custom scale (1 1 1)
2011-Dec-05 20:34:30.681615 (M) [render] Dim: (2, 2, 2)
2011-Dec-05 20:34:30.686615 (M) [render] Volume: 8
2011-Dec-05 20:34:30.691616 (M) [python] Initialized TowerEnvironment
2011-Dec-05 20:34:30.697616 (M) [python] init_rot: 0 0 0 <class
'OpenNero.Vector3f'>
2011-Dec-05 20:34:32.833738 (M) [python] Deleting TowerMod
2011-Dec-05 20:34:32.838738 (M) [ai] AI Engine disabled
2011-Dec-05 20:34:32.842739 (M) [python] CLEANUP
2011-Dec-05 20:34:32.847739 (M) [scripting] scripting engine
initialized
2011-Dec-05 20:34:35.079867 (M) [ai] AI Engine disabled
2011-Dec-05 20:34:35.091867 (M) Killing OpenNero