OLE/ActiveX Scripting Notes
I'm still working on this. These are just notes, and I'm a noob.
The ESRI ArcObjects don't fully support scripting. They support some basic level of scripting, but they don't fully support scripting with via contemporary OLE Automation, which is what Perl and other languages use.
Historically, there are three phases of COM/OLE that should help explain this situation a little.
First is COM. COM is a way to factor applications into objects that can be used across languages. Normally, you're constrained by the language.
Second is DCOM or OLE. OLE, and later, Distributed COM allowed for the objects to be located on different computers, or within another application. You could issue a method call to a remote program. The technology to do this involved "interfaces". An interface, in this situation, is a lightweight object that communicates with a remote concrete class, aka, coclass. The interface presents a "local face" for the remote object. To access the objects, you "instantiate an interface." Complex objects typically implement several interfaces, and, to access such an object, you needed to instantiate each interface separately, and then set the instance to the object.
Dim foo as IFooThing Set foo = CreateObject("Foo.FooThing") Dim bar as IApplication Set bar = foo
The first two lines set up an object called foo that is accessing Foo.FooThing via the IFooThing interface. The last two lines set up the bar object to also access Foo.FooThing, but via an IApplication interface.
Third is ActiveX and scripting. This is where we are today. Scripting requires a single interface to the entire object. ActiveX objects havea single interface to the entire object, called IDispatcher.
Historically, much of the ESRI applications are stuck back in the second period, where the objects lack an IDispatcher. Thus, ArcGIS apps are difficult to write using scripting tools that expect it.
The alternatives are to use VB for Applications, .NET, Java, C++, and VB.
I'm not certain if Python has support for COM interfaces. I believe it does, according to what some sites say.