Calling C# COM (.NET) from python

Andrew Falanga af300wsm at gmail.com
Mon Dec 8 22:33:38 CET 2008


On Dec 8, 11:52 am, Mike Driscoll <kyoso... at gmail.com> wrote:
> On Dec 8, 11:14 am, Ben Kaplan <bs... at case.edu> wrote:
>
>
>
> > On Dec 8, 2008, at 11:53 AM, Andrew Falanga <af300... at gmail.com> wrote:
>
> > > Hi,
>
> > > I've never programmed in python and only have a small understanding of
> > > what is wrapped up in the terms COM and .NET.  Is there a way of using
> > > python to get a hold of objects written in C# as COM objects using
> > > python?  I'm looking for ways to avoid VBScript (which, after a couple
> > > of weeks, I've determined to be horrid).  That is, is there a way of
> > > getting at COM objects in python that's similar to doing a
> > > CreateObject call in VBScript (http://msdn.microsoft.com/en-us/
> > > library/
> > > dcw63t7z.aspx)?
>
> > > Thanks,
> > > Andy
> > > --
> > >http://mail.python.org/mailman/listinfo/python-list
>
> > I would not deal with COM at all. I personally have not used it, but  
> > there is a version of python called IronPython that's written in C#,  
> > so it can use .NET and, I think, other C# objects. Other people will  
> > probably help you more, but you might want to look into that and maybe  
> > ask this on the python-win list.
>
> As I understand it, IronPython can use anything done in the CLR, so
> technically I could write something in VB.NET, C# or any of the other
> VS languages and then use them from within IronPython. It should be
> noted that IronPython does not support most 3rd party packages that
> are not pure python. As I recall, it doesn't have the complete builtin
> library either, but it's close.
>
> Reads the docs and check it out at least. If you already know .NET
> languages, then you'll probably find IronPython helpful.
>
> Mike

To all, thanks for the great replies.  I've got something to work with
here.  Thanks to for the link to PyWin32 and the mailing list.  That
sounds promising as does this IronPython.  I wished I knew more
of .NET and python more (as my original post claims, I've never
written Python and I only wished I knew the .NET stuff better for
better footing in this).  I'm very much the proverbial, "fish out of
water," as I'm a UNIX man now stuck in a Windows world.

Thanks again,
Andy



More information about the Python-list mailing list