r/Python • • Sep 17 '20

Resource PowerShell vs Python Reference

https://blog.ironmansoftware.com/powershell-vs-python/
88 Upvotes

25 comments sorted by

View all comments

7

u/its_a_gibibyte Sep 17 '20

For people that know Python (or perl or bash or whatever), what's the point of learning Powershell? It seems pretty limited since it's primarily for windows machines (and most servers are linux) and doesn't have the libraries that Python has.

2

u/[deleted] Sep 17 '20

It's cross-platform now so you can manage Linux with PS if you want to. And in terms of libraries there is a pretty solid module repository on PowerShellGallery.com but likely not nearly as extensive as Python.

That said, I don't really know Python enough to suggest why you would use PS over it.

1

u/gargar070402 Sep 17 '20

Interesting, but if one had a choice and had to write code from scratch anyway, would there be any reason to use PowerShell over, say, bash?

3

u/TheTerminator68 Sep 17 '20

I use PowerShell alot in my job along with some config management and python. PowerShell is better than bash in some ways because it lets you use objects and navigate through the objects in an easier way. Bash is pretty much text based and good for some basic one liners in linux land but once you get to slightly more complex code paths PowerShell wins over bash pretty easily. I have written applications in both PowerShell and Python and PowerShell is nice for windows environments but Python you can just do way more with and the library support is amazing. Also PowerShell is super inefficent resource wise. They all have their strengths/weaknesses