Python vs .Net

Afanasiy abelikov72 at hotmail.com
Sun Jan 5 02:14:52 EST 2003


On Sun, 5 Jan 2003 01:40:25 -0500, "Etienne Charland"
<mystery at golden.net> wrote:

>I would like to compare Python with .Net. First of all, for those who knows
>.Net, what are the pros and the cons of each? Secondly, how would I write
>this simple database application in Python, to see how it looks like. I've
>written the code required to do it in VB.Net.
>
>Let's say I have a window containing a ComboBox and a TextBox. At program
>load time, I get data from a database. I get those fields: "ID", "Code",
>"gNom". The ComboBox must contain the list of clients, showing the "Code"
>field . But I also must be able to get the associated ID of the selected
>item. And the items have to be sorted. When I select a client, the field
>"gNom" has to be displayed in the textbox, for the selected client.

As far as I know, Python has nothing as good as the .NET WinForms
wrapping of native Win32 interface components. Mark Hammond has wrapped
MFC, but that does not compare to WinForms.

Some people will suggest Tk and perhaps other GUI toolkits, but I don't
think anything that wraps native Win32 UI components in a nice framework
like WinForms (or even antiquated VCL) exists.

To answer your question, the application you presented would likely look
quite a bit different in Python and likely worse in code and appearance
because there is nothing like .NET's WinForms for Python. In fact, this
sort of well designed wrapping of native UI components is often missing
in many languages and platforms. DigitalMar's D is one in particular for
which I would love to see a possible VCL/WinForms-like UI framework.

On the other hand, Python does not use the same huge amount of resources
as .NET (or Java). Memory use is perhaps the biggest and most absolute
problem I have always had with Java and now .NET. The large runtime size
is another, secondary, problem for me.

Personally, I develop my GUI in non-Python and choose to embed Python,
but will never use .NET or Java because of their insane resource usage.




More information about the Python-list mailing list