Do you like this site? Remember to share it to all your friends on Facebook and Twitter!

Sunday, September 10, 2017

Prepare Python 2.7 on Microsoft Windows using PowerShell

Everyone today talks about the programming language Python while discussing Software-defined Networking (SDN). Since Python is so popular, it would be a good idea for network administrators to know more about Python. First thing first. I talk about how I prepare Python running environment on Microsoft Windows.

It would be nothing special if I only download the installation software from Python official web site by mouse clicking. Instead, I use PowerShell to download and install for me. That is, prepare one scripting running environment using another scripting language.

Here is the recorded video of how I do this.


The version I talk about is version 2.7.13.


One key step of this PowerShell script is to find out the appropriate direct binary download URL first. You can easily copy the URL after visiting Python.ORG official web site.


I list the original PowerShell script below for you to copy/paste. You can try it for yourself.

--- COPY BELOW ---
$url = "https://www.python.org/ftp/python/2.7.13/python-2.7.13.amd64.msi"
$output = "python-2.7.13.amd64.msi"
$start_time = Get-Date

Invoke-WebRequest -Uri $url -OutFile $output
Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)"

.\python-2.7.13.amd64.msi


--- END OF COPY ---


One more thing…

In my opinion, any programming languages should be working well to implement a successful SDN system. Because most of the SDN controller is running on top of a Linux server, basically any programming languages supported by Linux is a good choice.

My conclusion is: if you are already familiar and skillful enough in any mainstream programming languages, such as C, C++, Java, or Perl, you really don’t need to learn Python at all. Python is just one of the options.

However, if you are not good at any programming languages at all, and you only have time to study single language, then my best recommendation for you would be Python. Python is so easy to learn and use. And the most important reason is this. Because Python is so popular, you can find any examples and answers you might ask for by simply a Google Search.

I plan to talk more on Python in the future. What do you think about it? Let me know by leaving your comments below this post.

(I learned the PowerShell script from Hey, I'm Jourdan. "3 ways to download files with PowerShell")
Do you like this post? You really should consider Subscribing by Email!


Related Posts with Thumbnails

No comments:

Post a Comment

Tip: you can also anonymously comment here.

Popular Posts