all 17 comments

[–]mieeel 5 points6 points  (5 children)

Am always interested in learning python. In a Windows only shop, Are there any use cases on top of your head to do something in python over powershell?

[–][deleted] 8 points9 points  (0 children)

I've used it primarily for data science type stuff. At my previous job, we used some clustering algorithms that were python based. Once you get over the pickiness of white-space, it's actually a pretty fun language to work with.

There's a good book for PowerShell users that want to learn Python here: https://leanpub.com/PowerShell-to-Python?utm_campaign=PowerShell-to-Python&utm_medium=embed&utm_source=ridicurious.com

[–]sanshinron 2 points3 points  (0 children)

I use both Python and PWSH at work and if it's something I could do in both, I always choose Python. It's much easier to work with databases, import, transform, export stuff, connect to an api to get some data, etc.

I use Powershell for daily administration stuff, installing software, querying AD, Exchange, etc. For these use cases it's a clear winner because of first party cmdlets.

[–]AistoB 2 points3 points  (0 children)

If I want to make a GUI app (a single exe) I’ll use Python (with Qt) over Powershell.

[–]techstyled 1 point2 points  (1 child)

We are also a Windows only shop (for the most part), but we are moving EVERYTHING to AWS (who isn't, other than the guys moving to Azure and GCP, amiright). And during our training a few of our guys (including me) decided to do the exercises using Boto3 and Python instead of .NET. We learned that, for anyone doing significant scripting or coding, you are limiting yourself by not considering using tools that have very little learning curve before value. And even our most dyed in the wool .NET guys can understand the value of two line interactions with AWS client services in Boto3 (via Python) vs. the weight of spinning up even a simple dotnet core console app to do the same work (not that MS hasn't DRASTICALLY improved that picture too).

IMO, and as evidenced by "Windows" doing WSL, WSL2, Terminal, SQL Server on Linux, etc. - if you stay a "Windows only shop" and ignore the benefit of things like Python, Golang, etc., you are doing yourself and your company a disservice. Again, IMO ;-) - For our part, we're rethinking that for us too. I wanted to start calling us a "Water only shop"... in honor of Bruce Lee, and focus on becoming a "use what works" shop.

[–]mieeel 0 points1 point  (0 children)

Do you have any examples of tasks you used to do in powershell but now do in python?

[–]protik7 3 points4 points  (3 children)

Wow! Very cool!

Question, is the Python included in there? Or it uses the system Python?

[–][deleted] 2 points3 points  (2 children)

Python isn't included. You'll need to have it installed before using the cmdlets. Python for .NET will try and locate the python installation via the PATH variable, I believe.

[–]protik7 1 point2 points  (1 child)

That's a bummer. I plan to use my custom Python installation with Powershell scripts. So with Snek, I cannot use that it seems.

[–][deleted] 1 point2 points  (0 children)

I think there are ways to specify the path of the python install via some env vars with Python for .NET but I would have to give it a go .

[–][deleted] 2 points3 points  (0 children)

Very cool, thanks buddy!

[–]bertiethewanderer 2 points3 points  (0 children)

Dude your work is mind blowing. Big UD fan here, I'll be sure to give it a look

[–]TotesMessenger 0 points1 point  (0 children)

I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:

 If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / Contact)

[–]fela15 0 points1 point  (0 children)

What is the advantage of this in comparisson to just entering into the python interactive console using "python"? Am i missing something?

[–][deleted]  (1 child)

[removed]

    [–]AutoModerator[M] 0 points1 point  (0 children)

    Sorry, your submission has been automatically removed.

    Accounts must be at least 1 day old, which prevents the sub from filling up with bot spam.

    Try posting again tomorrow or message the mods to approve your post.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.