Complete Python Scripting for Automation

Complete Python Scripting for Automation

English | MP4 | AVC 1920×1080 | AAC 48KHz 2ch | 24h 39m | 2.97 GB

Get up to speed with automating repetitive tasks with Python

Over the last few years, Python has gained immense popularity. The demand for the programming language in the job market has particularly increased and being well-versed with it can help you enter some of the most exciting industries, including data science, artificial intelligence (AI), web applications, server-side automation, and home automation.

This course will make it easy for you to learn Python, with an emphasis on server-side automation. You will not only get to grips with core Python but also focus on advanced Python. Gradually, the course will take you through writing a Python script to print the OS name. You’ll also learn how to pass elements into a program using *args. To build on your knowledge further, you’ll understand the technique of transferring a file from a local server to a remote server and vice versa using paramiko.

Learn

  • Understand how to use Python scripting for automation
  • Get hands-on with core Python and advanced Python
  • Delve into the OS module and its various functions such as os.name and os.error
Table of Contents

Introduction
1 Introduction to the Python
2 Python setup on Windows
3 Python setup on Linux (Installing required python on Linux)
4 Editors for Python code
5 How to use Atom Editor to run python script

Basics of print, indentation, comments and special characters
6 simple hello world script
7 Python Indentation
8 Python Comments
9 Usage of special characters with print statement
10 Running Python script on Windows and Linux

Basics of variables and Data Types
11 Introduction to variables and print with variables
12 Data Types
13 working with multiple variable and strings in print
14 Input and Output Syntax

Complete String Operations
15 Basic operations on strings
16 case (Lower, Upper etc…) conversion operations
17 Boolean result operations
18 join, center and zfill (zero fill)
19 strip, split operations
20 count, index and find operations on strings
21 Practice – Display given string at left right center of a line in title format

Data Structures of Python
22 Introduction to Data Structures and Types of Data Structures
23 Lists
24 Tuples
25 Dictionaries
26 Sets

Operators of Python
27 Introduction to Operators of Python
28 Arithmetic and Assignment Operators
29 Comparison Operators
30 Identity and Membership operators
31 Logical Operators

Conditional statements
32 Introduction to conditional statements; simple if condition
33 if … else and if … elif … elif … else condition
34 Practice with conditional statements

Working with Python Modules
35 Introduction to Python Modules
36 platform module
37 getpass module

sys module
38 Introduction to sys module
39 sys.argv working with command line arguments with an example

OS Module
40 Introduction to OS Module and Basic operation
41 os.path module
42 os.system() function from os module
43 Practice script on platform and os module
44 os.walk(path)
45 Best Practice with os.walk for real-time

Loops – for and while loops with break, continue and pass
46 Practice – Read a path and check if given path is a file or a directory
47 Introduction to loops with an example
48 Loops Working with for loop
49 Simple practice with for loop
50 Find all files in a directory with required extension.py .sh .log .txt etc…
51 Complete range() function
52 for loop to work with strings, list, tuple and dictionaries
53 Introduction to while loop
54 Loop Control statements – break, continue and pass

datetime module to work with dates and times
55 Introduction to datetime module
56 Practice – Find the files which are older than x days from a given path

subprocess Module – To execute any Operating System Commands with python
57 Introduction to subprocess module
58 Practice-1 with subprocess module
59 Practice-2 – Platform independent script to find the java version

Working with text files
60 Working with text files – Reading and writing to text files
61 Copy the content of a source file into a destination file

Working with csv
62 Introduction to csv files and How to read a csv files using python
63 Read only header of a csv file and Finding the no of rows in a csv file
64 Creating csv file

Working with files like json
65 Working with json files

Exception Handling
66 Introduction to Exception Handling
67 Exception Handling for known Exceptions
68 try except else and finally usage
69 Raise user Defined Exceptions

Functions
70 Introduction to Functions
71 How to define a Function and How to use defined Function, Types of Functions
72 Converting simple code into Functions
73 Calling a function from another function and Scope of the variables
74 Simple Functions with arguments
75 Functions with arguments and return value
76 Functions with default arguments
77 Functions with keyword-based arguments
78 Functions with Variable length arguments
79 Functions with variable keyword arguments
80 How to use Functions of one script into another script, what is name
81 Simple exception handling to changing current working directory

Regular expression with re module
82 Introduction to regular expressions
83 Basic rules to create a pattern for regex
84 Rules to create a pattern Part-2
85 Rules to create a pattern Part-2
86 Regex with Flags
87 working with search and match operations from re module
88 working with findall and finditer operations
89 working with split, sub and subn operations of re module
90 compile operation (Execute all re operations on compile object)

Paramiko module to work with remote servers using python
91 Introduction to paramiko
92 Transfer file from local server to remote server and vice versa using paramiko

Shutil module
93 Part-1 – copy file(s) with shutil module

OOPS for Real Time
94 Encapsulation
95 Introduction to oops
96 Class and object attributes
97 Constructor of a class
98 Simple Python Script without and with oops concepts
99 destructor of a class
100 Polymorphism and inheritance of python oops

Windows Subsystem for Linux
101 Linux for Developers on Windows