[python-win32] C# Vs Python
James Matthews
nytrokiss at gmail.com
Mon Apr 2 21:51:53 CEST 2007
Thank you Bob but does python's windows extensions really have the power of
the .NET classes
On 4/2/07, Bob Gailer <bgailer at alum.rpi.edu> wrote:
>
> James Matthews wrote:
> > I am not asking for a very detailed comparison that i know no one will
> > give i am just wondering for windows development which language would
> > be better? What i mean is GUI apps, interfacing with excel,word and
> > outlook etc..
> Well, for one, Python requires a lot less code to accomplish the same
> task:
>
> The following is a very simple C# program, a version of the classic
> "Hello, world!" example:
>
> class ExampleClass
> {
> static void Main()
> {
> System.Console.WriteLine("Hello, world!");
> }
> }
>
>
> Th Python equivalent is:
>
> print "Hello, world!"
>
> With the assistance of Mark Hammond's excellent pywin package, COM
> interfacing is at least as easy as in other languages:
> import win32com.client
> xl = win32com.client.Dispatch("excel.application")
> xl.visible = True
> wb = xl.WorkBooks.Open(filename)
> sh = wb.Sheets(1)
> etc.
>
> There are various GUI toolkits available. I've not done much with them.
>
> --
> Bob Gailer
> 510-978-4454
>
>
--
http://www.goldwatches.com/watches.asp?Brand=39
http://www.wazoozle.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20070402/657f5c33/attachment.htm
More information about the Python-win32
mailing list