Leanpub Header

Skip to main content

PowerShell Guide to Python

A Comparative Approach to Learn two Scripting Languages at once. Fast!

Learn core concepts of Python effectively and FAST! In a way that is relatable with the concepts of PowerShell you already know.

The book is designed in associative learning approach, so that concepts sticks with readers for longer time and they can jump-start their Python programming journey.

Buy early, pay less, free updates.

Minimum price

$20.00

$25.00

You pay

$25.00

Author earns

$20.00

Packages

Details
$

...Or Buy With Credits!

You can get credits monthly with a Reader Membership
PDF
EPUB
WEB
850
Readers
288
Pages
31,527Words
About

About

About the Book

This PowerShell Scripting guide to Python is designed to make readers familiar with syntax, semantics and core concepts of Python language, in an approach that readers can totally relate with the concepts of PowerShell already in their arsenal, to learn Python fast and effectively, such that it sticks with readers for longer time.

"Use what you know to learn what you don't. " also known as Associative learning.

Book follows a comparative method to jump start readers journey in Python, but who is the target audience? and who should read this book -

  • Any System Administrator who want to step into Development or Programming roles, and even if you don't want to be a developer, knowledge of another scripting language will make your skill set more robust.
  • Python Developers who want to learn PowerShell scripting and understand its ease of user and importance to manage any platform.
  • This book works both ways: As a reader you can use the book to learn Python if you know PowerShell, or learn PowerShell if you know Python. PowerShell and Python code samples and screenshots next to each other makes it very easy for readers to relate the common concepts and practices and learn the scripting language in no time.

Python is one of the top programming languages and in fast changing IT scenarios to DevOps and Cloud to the future - Data Science, Artificial Intelligence (AI) and Machine Learning Python is a must know.

But this PowerShell Scripting guide to Python would be very helpful for you if you already have some knowledge of PowerShell

NOTE! This is a Leanpub "Agile-published" book. That means the book is currently unfinished and in-progress. As I continue to complete the chapters, we will re-publish the book with the new and updated content. Readers will receive an email once a new version is published!

While the book is in progress, please review it and send any feedback or error corrections at prateek@ridicurious.com and you can also tweet me your queries here . Thank you.

Share this book

Packages

Pick Your Package

All packages include the ebook in the following formats: PDF, EPUB, and Web

The Book

Minimum price

Suggested price$25.00

$20.00

    Team Package of 5 Books

    Minimum price

    Suggested price$95.00

    25% discount on each copy

    $75.00

      This book is also available in the following packages:

      • Team Package of 10 Books

        30% discount on each copy

        Minimum price
        $140.00
        Suggested price
        $180.00

      Author

      About the Author

      Prateek Singh

      Prateek Singh is an Infrastructure Developer, an avid PowerShell blogger, and a community contributor. In 2017 and 2018, FeedSpot and SQLHack recognized his blog RidiCurious.com as among the “Top 50 PowerShell blogs in the world.” Find his open-sourced at GitHub, and reach out to him on Twitter at @singhprateik.

      Prateek has written more than 250 articles on his blog and several other websites such as 4SysOps.com, IPSwitch.com, and TechTarget.com and also runs a YouTube channel. He is a published author of 3 books and contributing author of 2 Book and currently writing the 6th one, following is the complete list:

      Contents

      Table of Contents

      1Introduction

      2About the Book

      1. 2.1Why did I write this book
      2. 2.2Who is the Target Audience
      3. 2.3Prerequisites
      4. 2.4Feedback

      3The Basics

      1. 3.1Version
      2. 3.2Case Sensitivity
      3. 3.3Indentation
      4. 3.4Comments
      5. 3.5Variables
      6. Key Pointers
      7. Reading Recommendations

      4Console Input/Output

      1. 4.1Printing to Console
      2. 4.2Reading from Console
      3. 4.3Reading from Console Securely
      4. Key Pointers
      5. Reading Recommendations

      5Creating your First Script

      1. 5.1Saving Commands as a Script File
      2. 5.2Running the Script File
      3. Key Pointers
      4. Reading Recommendations

      6Passing Command-Line Arguments

      1. 6.1‘sys.argv’ in Python
      2. 6.2‘$args’ Automatic Variable in PowerShell
      3. 6.3‘Params()’ in PowerShell
      4. 6.4‘argparse’ Module in Python
      5. 6.5Parameter Help
      6. Key Pointers
      7. Reading Recommendations

      7Object Introspection

      1. 7.1Class, Object, Property, and Method
      2. 7.2‘Get-Member’ cmdlet in PowerShell
      3. 7.3‘type()’ Method in Python
      4. 7.4‘dir()’ Method in Python
      5. 7.5‘inspect’ Module in Python
      6. Key Pointers
      7. Reading Recommendations

      8The Help System

      1. 8.1Get-Help cmdlet in PowerShell
      2. 8.2‘help()’ Method in Python
      3. 8.3Understanding How a Module Works

      9Modules

      1. 9.1Modular Programming
      2. 9.2Importing Modules
      3. 9.3Installing Modules
      4. 9.4Creating Modules

      10Data Types

      1. 10.1Common Data types
      2. 10.2Checking the Data Type
      3. 10.3Data type casting

      11String Manipulations and Formatting

      1. 11.1Common String Operations
      2. 11.2String Formatting
      3. 11.3Substring or String Slicing
      4. 11.4Testing String Membership
      5. 11.5Built-in methods

      12Date and Time

      1. 12.1Get Date and Time
      2. 12.2Convert String to datetime object
      3. 12.3DateTime formatting
      4. 12.4Time Span or Time Delta

      13File Handling

      1. 13.1Reading from a File
      2. 13.2File Modes
      3. 13.3Create and write to a text File
      4. 13.4Appending data to the File

      14Arrays, List, ArrayList and Tuples

      1. 14.1Arrays
      2. 14.2ArrayList (.Net)
      3. 14.3Lists
      4. 14.4Common PowerShell Array and Python Lists Operations
      5. 14.5Tuples
      6. 14.6Sets

      15Dictionary and Hashtable

      1. 15.1Hash Table
      2. 15.2Dictionary

      16Conditional Statements

      1. 16.1If Statement
      2. 16.2Else Statement
      3. 16.3The elif and ifelse statement
      4. 16.4Nested Conditional Statements

      17Loops

      1. 17.1For Loop
      2. 17.2ForEach and ForeEach-Object
      3. 17.3While Loop
      4. 17.4Loop Control Statements
      5. 17.5Nested Loops

      18Functions

      1. 18.1Types of Functions
      2. 18.2Creating a Function
      3. 18.3Calling a Function
      4. 18.4Functions vs Methods
      5. 18.5Parameters and Arguments
      6. 18.6Mandatory and Default parameters
      7. 18.7The Anonymous Functions

      19Handling XML and JSON Data

      1. 19.1Difference between JSON and XML
      2. 19.2Reading XML from a file
      3. 19.3Accessing XML as Objects
      4. 19.4Accessing XML with XPath
      5. 19.5Using XML for Object Serialization
      6. 19.6Parsing JSON
      7. 19.7JSON Serialization and De-Serialization

      20Reading and Writing CSV Files

      1. 20.1What is CSV
      2. 20.2Reading CSV File
      3. 20.3Writing CSV File

      21Error Handling

      1. 21.1Types of Errors
      2. 21.2Raising an Exception or Throwing an error
      3. 21.3Handling Exceptions using Try..catch..finally

      22Built-In Functions

      1. 22.1Basic Mathematical Operations
      2. 22.2Selection and Arrangement
      3. 22.3Union and Intersection
      4. 22.4Dynamic Execution of Code

      Get the free sample chapters

      Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

      The Leanpub 60 Day 100% Happiness Guarantee

      Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

      Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

      You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

      So, there's no reason not to click the Add to Cart button, is there?

      See full terms...

      Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

      We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

      (Yes, some authors have already earned much more than that on Leanpub.)

      In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

      Learn more about writing on Leanpub

      Free Updates. DRM Free.

      If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

      Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

      Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

      Learn more about Leanpub's ebook formats and where to read them

      Write and Publish on Leanpub

      You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

      Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

      Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

      Learn more about writing on Leanpub