[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Python or PowerShell ?

josepharmbruster@gmail.com

1/8/2008 6:48:00 PM


I am all about using the right tool for the right purposes, which is
why I have started reading the GettingStarted guide to PowerShell. I
am curious if any other pythoneers have ventured into the world of
PowerShell. Mostly, I am interested in grabbing perspectives on the
differences noticed from those that have working experience with using
both.

I dug up one article from Google that talked about comparison but that
was about it.

http://www.simple-talk.com/sql/database-administration/comparing-python-and-powershell-dba-s...
5 Answers

Torsten Bronger

1/8/2008 7:24:00 PM

0

Hallöchen!

josepharmbruster@gmail.com writes:

> I am all about using the right tool for the right purposes, [...]

Which purpose?

> I dug up one article from Google that talked about comparison but
> that was about it.
>
> http://www.simple-talk.com/sql/database-administration/comparing-python-and-powershell-dba-s...

This comparison is about a very narrow field; additionally, it is a
field PowerShell was optimised for.

Tschö,
Torsten.

--
Torsten Bronger, aquisgrana, europa vetus
Jabber ID: bronger@jabber.org
(See http://ime.... for further contact info.)

Martin P. Hellwig

1/8/2008 7:57:00 PM

0

Torsten Bronger wrote:
> Hallöchen!
>
> josepharmbruster@gmail.com writes:
>
>> I am all about using the right tool for the right purposes, [...]
>
> Which purpose?
>
>> I dug up one article from Google that talked about comparison but
>> that was about it.
>>
>> http://www.simple-talk.com/sql/database-administration/comparing-python-and-powershell-dba-s...
>
> This comparison is about a very narrow field; additionally, it is a
> field PowerShell was optimised for.
>
> Tschö,
> Torsten.
>
And adding to that, if you don't care about cross platform anyway, why
even bother with python? I am sure that MS has tools that can do in a
point and click kind of way all the things you might encounter.

--
mph

Mike Driscoll

1/8/2008 8:10:00 PM

0

On Jan 8, 1:57 pm, "Martin P. Hellwig" <x...@xs4all.nl> wrote:
> Torsten Bronger wrote:
> > Hallöchen!
>
> > josepharmbrus...@gmail.com writes:
>
> >> I am all about using the right tool for the right purposes, [...]
>
> > Which purpose?
>
> >> I dug up one article from Google that talked about comparison but
> >> that was about it.
>
> >>http://www.simple-talk.com/sql/database-administration/comp......
>
> > This comparison is about a very narrow field; additionally, it is a
> > field PowerShell was optimised for.
>
> > Tschö,
> > Torsten.
>
> And adding to that, if you don't care about cross platform anyway, why
> even bother with python? I am sure that MS has tools that can do in a
> point and click kind of way all the things you might encounter.
>
> --
> mph

I code mostly for Windows users, but I use Python almost exclusively.
Why?

1) Python is "free"
2) Microsoft Visual Studio is very expensive
3) Python is Open Source
4) Visual Studio is not Open Source
5) I can actually take the code from IDLE and refine it for my
purposes if it doesn't suit me. Good luck doing that with practically
anything Microsoft supplies.
6) With relative ease, I can go cross-platform with my code if
requirements change

I could go on. There are many good reasons to use Python (or some
other good open source language, like Ruby) even if you just program
for Windows.

Mike

Matt McCredie

1/8/2008 10:14:00 PM

0

On Jan 8, 2:24 pm, Torsten Bronger <bron...@physik.rwth-aachen.de>
wrote:
> Hallöchen!
>
> josepharmbrus...@gmail.com writes:
> > I am all about using the right tool for the right purposes, [...]
>
> Which purpose?
>
> > I dug up one article from Google that talked about comparison but
> > that was about it.
>
> >http://www.simple-talk.com/sql/database-administration/comp......
>
> This comparison is about a very narrow field; additionally, it is a
> field PowerShell was optimised for.

Also, the code looks like they took optimized PowerShell code, and
just hacked together something to do the equivalent Python. There
appears to be little or no attempt to create nice efficient Python
code. For a true comparison two things are missing. 1) The reverse, do
something in python and then try to write it in PowerShell. 2) be
diligent in doing as much as possible to make both versions as simple
as possible. Pick any two languages and I can make the argument that
either one is better than the other if I pick something that one
language is better at and spend as little time as possible writing the
other version.

That might be a good exercise. Anybody wanna attempt re-writing the
python examples in that article? Just one glance at it and I can see
it was written by a Python novice. Now, I don't think the finished
product will be as small as the PowerShell equivalent, but it might be
easier to read and will look a heck of a lot nicer than it currently
does.

Matt

Martin P. Hellwig

1/10/2008 1:47:00 PM

0

kyosohma@gmail.com wrote:
> On Jan 8, 1:57 pm, "Martin P. Hellwig" <x...@xs4all.nl> wrote:
<cut>
>> And adding to that, if you don't care about cross platform anyway, why
>> even bother with python? I am sure that MS has tools that can do in a
>> point and click kind of way all the things you might encounter.
<cut>
>
> I code mostly for Windows users, but I use Python almost exclusively.
> Why?
>
> 1) Python is "free"
> 2) Microsoft Visual Studio is very expensive
> 3) Python is Open Source
> 4) Visual Studio is not Open Source
> 5) I can actually take the code from IDLE and refine it for my
> purposes if it doesn't suit me. Good luck doing that with practically
> anything Microsoft supplies.
> 6) With relative ease, I can go cross-platform with my code if
> requirements change
>
> I could go on. There are many good reasons to use Python (or some
> other good open source language, like Ruby) even if you just program
> for Windows.
>
> Mike

Well if that are your requirements, which are all good ones btw, then
you have answered your own question :-)

--
mph