Just starting with Python, I now decided it was time to see if I could get debugging functional in a Python IDE, to ease coding and debugging. Since I couldn't get PythonWin to function as a debugger for ArcGIS, even after specifically setting it as the debugging application in ArcGIS 10's Geoprocessing Options, I decided to download PyScripter instead, as I saw it mentioned on another forum. That works! I could get it launched from ArcGIS by right clicking a script and choosing "Debug". It properly loads and executes and nicely shows all content and properties of the variables and functions used in the script. However, as soon as I use a Spatial Analyst command (which is licenced, and I have run the same script successfully from ArcGIS), the debugger stops at that point stating "The tool is not licensed" as visible in the PyScripter "Python Interpreter" window.
Is there anything else I need to do to make an external Python IDE like PyScripter aware of available licenses on extensions like Spatial Analyst? Any specific settings to be made or arcpy modules to import???
Like you suggested, I did not check out the Spatial Analyst extension, as I wasn't aware I needed to do this. I now changed the code with help of the examples, and it works properly! I can see the Raster object listed now in PyScripter's debugging mode and variables window. Very nice and useful.