Pythonwin and .NET

Mark Hammond mhammond at bigpond.net.au
Fri Sep 7 21:51:21 EDT 2001


Maan Hamze wrote:

> This is a question for Mark Hammond.
> The Buzzword these days is .NET, and quite frankly I have not had the time
> to get familiar with this 'new' technology.
> However, on all our NT servers we use PythonWin for ASP work; and in
> addition, more recently, we got into the regular CGI Python scripts.  In
> other words, we do depend on Pythonwin for ASP Python scripting.  Also,
> recently, we are delving into using Python with COM objects beyond the mere
> use for web pages.
> In other words, PythonWin is emerging by itself to be a centerpiece package.
> So the question is:
> How will Microsoft .NET affect PythonWin and the way we do things through
> ASP and Python at least.  If there is a website where you comment on these
> things I can look at it.  Or you are welcome to offer some of your comments
> here.

This is a hard and politically loaded question :)

The new world (.NET) and the old world (Python, Perl, etc) are really 
quite distinct.  To see all the benefits of .NET, you assume a world 
based on .NET.  So while .NET has some obvious and significant benefits, 
it does require a leap of faith to fully exploit them.

I believe it will be a few years before .NET really starts taking off. 
It will be lead mainly by corporates - people commited to being a 
"Microsoft Shop" for their own strategic reasons.  In my opinion, large 
IT shops filled with mediocre programmers have very good reasons for 
making such decisions, so I imply nothing negative about such places or 
decisions.

I honestly do not know where Python and Perl really will fit in this new 
world.  .NET imposes certain requirements on programs, so that the 
benefits of .NET can be realized.  However, these requirements can often 
work against languages such as Python.  The dynamic and introspective 
nature of Python is unlikely to be able to be exploited, unless .NET 
itself grows these same capabilities - and when .NET grows them, we can 
expect C# to also grow them.

For example, in the ideal world, you could implement a Python class with 
__getattr__() functionality, and use that class from Visual Basic or 
from C#.  This is only likely to be possible if .NET itself grows 
support for expressing this level of dynamic attribute access, and if 
.NET itself has it, we could expect the popular MS languages to also 
grow such features - ie, the equivilent of __getattr__ implementation in 
C# or VB.  Once everything gets to the point where Python can express 
these things in .NET, why would you still use Python?  As much as the 
*syntax* of Python is very nice, it is not only the syntax that makes us 
love the language - it is the language as a whole.

So if .NET has all the features necessary to allow Python to be fully 
utilized by other .NET languages, many shops will simply choose to use 
these other languages instead of Python - braces aren't *that* bad :)

If .NET never has this capability, it will mean that Python itself can 
only take advantage of Python's features - so why use the .NET 
implementation of Python at all?

But heck - I thought OS/2 was a sure fire winner :)

Mark (who is certainly not speaking for his employer:)




More information about the Python-list mailing list