Python or PowerShell ?

  • Thread starter josepharmbruster
  • Start date
J

josepharmbruster

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/data...mparing-python-and-powershell-dba-scripting-/
 
M

Martin P. Hellwig

Torsten said:
Hallöchen!

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/data...mparing-python-and-powershell-dba-scripting-/

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.
 
K

kyosohma

Torsten said:
Hallöchen!
(e-mail address removed) writes:
I am all about using the right tool for the right purposes, [...]
Which purpose?
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.

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
 
M

Matimus

Hallöchen!

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.

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
 
M

Martin P. Hellwig

On Jan 8, 1:57 pm, "Martin P. Hellwig" <[email protected]> wrote:
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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top