[python-win32] Compiling Python code to DLLs: Any way to do this

Vernon Cole vernondcole at gmail.com
Sun Nov 8 15:54:30 CET 2009


My son, who is a soil scientist in the United States Department of
Agriculture, has been encouraging me to learn ArcGIS for years. He tells me
that Python is the ESRI's language of choice for implementing extensions to
ArcGIS. That being the case, I tried a Google search for "arcgis python" and
got a number of links, including this one from ESRI.
http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&d=30028
I have not downloaded the slideshow, but I am guessing that it will answer
your questions.  If not, feel free to ask for more details here. I would
then have an excuse to learn more about this myself.  He claims that it
would be good for my consulting repertory.
--
Vernon Cole


On Sat, Nov 7, 2009 at 10:20 PM, Ti Crossman <ti.crossman at myfairpoint.net>wrote:

>  Hello, all.  I have a need to create application extensions for ESRI
> ArcGIS geographic information system software.  ArcGIS is built from the
> ground up using COM technology.  Supposedly, one can program against the
> (absolutely enormous) ArcObjects object model with any COM-compliant
> language.  From what I understand, that includes Python -- with the pywin32
> extensions, of course.  Now, the real trick here is that the extension must
> be compiled into a DLL (and must implement the IExension interface) for
> ArcGIS to recognize it as an extension.
>
> So, making the whopping assumption that I can pull off such a coding feat
> with Python (2.5.1 in this case), I have one main question:  is there a way
> to compile my Python code into a DLL that will work for me?
>
> I did some reading up on py2exe and gather that it will compile Pyhton
> modules to DLLs; however, I also saw a reference to COM DLLs vs. C-type DLLs
> and whether or not they have random entry points.  This is out of my league,
> I'm afraid.  Long ago, I used to write extensions for ArcGIS using VB6 in MS
> Visual Studio -- fast, easy, and powerful, and DLLs were native; however, I
> can't say that I know which of the two types of DLLs I was producing.  Now,
> ESRI and Microsoft are not supporting VB6 anymore, and I don't know C/C++,
> .NET, or any other compiled COM-compliant language.  I'm simply not a
> trained programmer.  Besides, I don't have access to a modern version of
> MSVS.  I _have_ been trying out Python recently (love it), and with wxPython
> and other do-dads, I can make some really nice applications.  I would love
> to be able to write ArcGIS extensions in Python, but the DLL thing is a
> deal-breaker if I can't make one from the Python code.
>
> My system:
>
> Windows XP
> ArcGIS 9.3 (for those for whom this means anything)
> Python 2.5.1 (has to be this version:  comes with ArcGIS, and ArcGIS is
> dependent on it)
> pywin32
> wxPython 2.8
>
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20091108/f3ebeffc/attachment.htm>


More information about the python-win32 mailing list