Lead Image © Beboy, Fotolia.com

Lead Image © Beboy, Fotolia.com

Comparing PowerShell and Python

Language Duel

Article from ADMIN 41/2017
By , By
Although PowerShell has its ardent advocates, many admins and users swear by Python, especially for Windows. Which scripting language is best for you? Read on for a comparison of PowerShell and Python.

Admins rely on scripts to automate regular processes. In Windows, some configurations are only possible in PowerShell. However, PowerShell is not the only scripting language – Python is also a popular option. In this article, we compare the two languages and examine possible usage scenarios on Windows, Linux, and Mac OS.

We'll start with Python. Linux admins and users have probably used Python, even if only to run a .py script on their computers. Python, which was developed in the spirit of free software, is available free of charge as source code and in binary form, together with the standard library [1].

Python is an extensive interpretive programming language that goes far beyond a normal scripting language, supporting all of the features and capabilities you expect from modern programming and scripting languages. These features include, among other things, object orientation (including the use of classes and abstract data types), the option of splitting programs arbitrarily into modules (as well as the multitude of existing standard modules), the use of exception conditions (exceptions), and the option of expanding the language (e.g., with code written in C). Unlike many interpreted languages, variable and argument declarations are not necessary, which significantly simplifies rapid programming, but it can also lead to problems (e.g., from inadvertent typos in variable identifiers).

Many users point out that Python code is generally quite readable, which significantly increases its recyclability. Unlike other programming languages, which sometimes make excessive use of brackets and semicolons – and where the resulting errors in translation or interpretation have driven some developers to despair – Python indents lines to add structure. After a familiarization period, even C programmers can see the advantages of this type of representation. Finally, Python is also

...
Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs



Support Our Work

ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

Learn More”>
	</a>

<hr>		    
			</div>
		    		</div>

		<div class=