Learn Python Programming Language
3.9 (87 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,647 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Learn Python Programming Language to your Wishlist.

Add to Wishlist

Learn Python Programming Language

Learn what Python is by learning about the language, structure, various features, functions, extensions, and modules.
3.9 (87 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,647 students enrolled
Created by LearnSmart LLC
Last updated 7/2015
English
English
Current price: $10 Original price: $150 Discount: 93% off
1 day left at this price!
30-Day Money-Back Guarantee
Includes:
  • 15.5 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Have a coupon?
What Will I Learn?
Upon completion of this course you will have gained a basic understanding of Python, You will know how to install a Python environment, and be able to identify the different data types and data structures.
You will gain an in-depth understanding on conditionals, constructs, and loops as well as a firm understanding of modules, packages, and the importing of modules.
You will understand input/output handling and have a firm understanding of how to handle errors and exceptions in Python.
You will be able to identify the various modules, methods, and functions involved with the standard library, built-in functions, and string and text handling, and be able to utilize various tools used to test, debug, profile and tune Python.
You will have a basic understanding of runtime services and language services, and will be able to identify and describe what a database is and how they are used in Python.
You will be able to identify the various methods used for file and directory handling, and be able to identify how threads and concurrency work in Python.
You will have a solid foundation of how operating system services work and be able to identify how network programming is accomplished in Python.
You will be able to identify the key concepts for Internet protocols and data handling, and will be able to identify the key areas of web programming in Python.
You will be able to explain the different markup processing tools and markup languages for Python.
View Curriculum
Requirements
  • No prerequisites for this course - A computer with Internet
Description

Welcome!

This is an introduction to the Python programming language. This course relies on the learner having some previous programming experience to effectively use the concepts explained in the course. With Python, you can deliver code faster and integrate systems more effectively than most other languages. In this course you will be introduced to the Python programming language and what it can do for you.

Prerequisites: Previous programming experience is suggested. This is a fast paced course and we'll throw a lot at you. If you're a programming newbie and not just a Python newbie, you may be in over your head.

Section 1: In the pre-assessment quiz you'll face questions from all sections of this Python training. Test your current knowledge and know your strengths and weaknesses.

Section 2-4: The student will learn how you can make the best use of Python to meet your programming needs. They will be learning how to install Python, configure and customize Python, and how to terminate a program in Python. As well as explaining the different data types and structures that are used in Python.

Section 5-7: Python programs can be decomposed into modules, statements, expressions, and objects, as well as allows you to keep blocks of code in a file and use them as a module. The student will also be introduced to concepts on standard input, output, and error.

Section 8-10: The student will be learning about how exception handling is carried out in Python, take an in-depth look at doctest module and unittest module and its various tools, and give you an in-depth look at standard library, built-in functions, and string and text handling.

Section 11-13: The student will be introducing the student to the functions, modules, and operations involved in runtime services and language services, cover programming interfaces in Python, and explain about modules that are used for processing various kinds of operations in files and directories.

Section 14-16: The student will be introduced to library modules that enable threads and concurrency in Python, given an overview of some of the operating system services, and cover how Python offers modules for different processes to communicate.

Section 17-19: The student will be learning about Internet protocols and how they are used to communicate across a set of interconnected networks and computers, cover methods, Internet protocols, and the technology used to combine Python with a web server to create dynamic content, and covers Python modules such as HTML, XML, DOM and SAX, and Expat.

Section 20: Final Exam

Who is the target audience?
  • This course is intended for programmers wishing to learn the basics of Python and its concepts.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
Expand All 407 Lectures Collapse All 407 Lectures 15:29:16
+
Orientation Video
1 Lecture 01:13

This lecture contains a demonstration on how to use the supplemental materials.

Preview 01:13
+
Pre-Assessment
0 Lectures 00:00

These sections can be taken in any order, as a review of a particular concept. However, if you are just becoming familiar with Python, it is recommended that you view the sections sequentially.

Quizzes in your LearnSmart Online Training help you determine your level of command of the material covered in this training course. This Pre-Assessment quiz is designed so that you will be able to see the progression you have as you complete the course. Whether you have pre-existing knowledge or not, the answers given do not effect any scores or required for certification, but helps get you ready and in the mind-set of what this course will be covering.

Pre-Assessment
18 questions
+
Introduction to Python
13 Lectures 01:03:21

In this course, we will introduce Python and tell what it can do for you. Python is a high­ level programming language. It makes you work faster. You can deliver code faster and integrate systems more effectively than most other languages.

This lecture will introduce you to Python and the concepts within it.

Topics Covered Include:
  • Python Features
  • Key Features
  • Recommendations
Preview 05:31

Python is easy to learn. It is a beginners' language, having relatively few keywords and a simple structure. Moreover, it has a clearly defined syntax. It will not take long for programmers to learn and start writing programs using Python.

This lecture will discuss the features within Python, and how they are used.

Topics Covered Include:
  • Features
  • Procedure-Oriented Programming
  • Ensurepip Module
Preview 09:07

Python 3.0 does not maintain backward compatibility with the older versions of Python. In other words, code developed for Python 2.x may not work with Python 3.x, and vice­-versa.

This lecture will discuss the different environments used for Python, and what each of them does.

Topics Covered Include:
  • Python 3.0
  • Running Python
  • Running the First Program in Python
Preview 07:45

This lecture contains a demonstration on how to use Python.

Preview 02:06

Chapter 1 Quiz
2 questions

Identifiers and reserved words are basic building blocks of any programming language. An identifier is used to identify a module, function, variable, class, or any other objects. You probably noticed that I used the terms function, class, module, and object.

This lecture will discuss the data types and operations within Python, and what each of them does.

Topics Covered Include:
  • Identifiers of Variables
  • Data Types
  • Number Data Types
  • Python Number Types
Data Types and Operators in Python
09:39

This lecture contains a demonstration on how to assign values and variables.

Assigning Values to Variables Demo
04:00

Lists are sequences of arbitrary objects. You can create a list by enclosing values in square brackets. Lists are indexed by integers, starting with zero as the first index.

This lecture will discuss the concepts within lists, tuples and dictionaries, as well as how they are used.

Topics Covered Include:
  • Lists
  • Tuples
  • Dictionary
Lists, Tuples, and Dictionaries
02:12

This lecture contains a demonstration on how to use string variables.

String Variables Demo
05:54

An if statement is the basic decision making statement in Python. It can also have an else part to it. If and else statements can perform simple tests. The bodies of the if and else clauses should be denoted by indentation.

This lecture will discuss the ways of programming the features within Python, and the reasons for doing so.


Topics Covered Include:
  • Decision Making Statement
  • Iterations
  • Exceptions
Programming Features in Python
02:33

This lecture contains a demonstration on how to use conditional statements.

Conditional Statements Demo
01:54

If your programs are big in size, you should break them into multiple files for better maintenance. These are called modules. A module organizes your Python code logically. Simply put, a module is a file consisting of Python code.

This lecture will discuss the modules within Python and what they are used for.


Topics Covered Include:
  • Input and Output Functions
  • Files in Python
  • Databases in Python
Modules in Python
08:06

Any code that you write using a compiled language, like C, C++, or Java, can be integrated or imported into another Python script. This code is called an “extension.”

This lecture will discuss the Extensions and OOPs within Python, and what they are used for.

Topics Covered Include:
  • Grouping Code
  • Class and Inheritance
  • Function Overloading
  • Polymorphism
Extensions & OOPs in Python
03:14

This lecture will take you through some of the key points covered throughout the second portion of this section. Upon Completion of this section you will be prepared to move on to the next Section: Development, Setup, and Deployment.

Conclusion
01:20
+
Development, Setup, and Deployment
15 Lectures 37:27

Our goal is to help you understand how to install a Python environment on your system, as well as help you with the setup. Once setup is done, you can develop applications and deploy them. Python can be hosted on Unix, Windows-­based systems, and Mac.

This lecture will introduce you to development, setup, and development. As well as the concepts within it.

Topics Covered Include:
  • Python Overview
  • Installing Python
  • Python on Windows
Python Overview
07:02

This lecture contains a demonstration on how to instal Python.

Installing Python Demo
04:02

When an installation is done, programs and other setup files related to Python may exist in some other directories. Operating systems provide a search path. The search path is nothing but the operating system searching for executables from the listed directories.

This lecture will discuss the ways of configuring Python on windows and what goes into it.

Topics Covered Include:
  • Search Path
  • Set the PythonPath
  • Installed Python
Configuring Python on Windows
02:16

Python includes a launcher to run scripts. What if the launcher isn't installed? By default, Python scripts with the extension .py can be executed by python.exe. Execution leads to opening the terminal and it stays back even if the program uses GUI.

This lecture will discuss the ways of running Python scripts, and the steps needed to do so.

Topics Covered Include:
  • Running Python Scripts
Running Python Scripts
01:06

This lecture contains a demonstration on how to use Python variables.

Python Variables Demo
01:04

There are some additional modules for scripting Python. Even though Python aims to be portable among all platforms, there are some features that are unique to Windows.

This lecture will discuss the additional modules within Python, and what they are used for.

Topics Covered Include:
  • Python Modules
  • Compiling Cpython
Additional Modules
02:11

In Windows, Python launcher helps us to launch scripts. This aids in locating and executing different Python versions. It allows scripts or command-­line to point out a preference for a specific Python version.

This lecture will discuss the ways of launching Python and Windows, and how to use it.

Topics Covered Include:
  • Launching Python
  • Command Prompt
  • Sitecustomize Module
Launching Python on Windows
06:16

Normally, third-­party modules are kept in a common place so that others can access them. However, individual users can install modules and packages in a per user site­-directory.

This lecture will discuss the ways of providing a per-user site package, and what they are used for.

Topics Covered Include:
  • Per-User Site Package
  • Unix and Mac
  • Windows System
Per-User Site Packages
01:03

When a new release of Python is released, some of the features may have compatibility issues with older versions. So, these features come disabled. However, they will still be available. No feature name is ever deleted from future.

This lecture will discuss the ways to enable future features within Python, and how they are used.

Topics Covered Include:
  • Enabling Future Features
Enabling Future Features
00:53

Chapter 1 & 2 Quiz
5 questions

On exit, the Python interpreter decrements the reference count of all objects in all the latest known namespaces and destroys each namespace as well. If the reference count of an object reaches zero, the object is destroyed and its del method is invoked.

This lecture will discuss the meaning of program termination, and what it is used for within Python.

Topics Covered Include:
  • Program Termination
  • OS Exit Function
Program Termination
01:49

This lecture will discuss the ways of developing and deploying applications within Python, and what they are used for.

Topics Covered Include:
  • IDEs
Development and Deployment of Applications
00:31

This lecture contains a demonstration on how to use Python plugins.

Python Plugins Demo
02:12

The world today talks about cloud and virtualization. The venv module provides support for creating lightweight virtual environments with their own site directories. They are optionally isolated from system site directories.

This lecture will discuss the meaning of virtual environments, and what they do.

Topics Covered Include:
  • Venv Module
  • Deploying Apps on Cloud
Virtual Environments
01:36

The benefits of using frameworks comes getting the benefit when developing from the framework itself. Then there are plugins and extensions available which can be leveraged.

This lecture will discuss the meaning of migration and upgrade of Python, and what it does.

Topics Covered Include:
  • Python Migration
  • Applications
  • Modules and Packages
  • Frameworks
Migration and Upgrade of Python
04:11

This lecture will take you through some of the key points covered throughout the second portion of this section. Upon Completion of this section you will be prepared to move on to the next Section: Data Types, Data Structures.

Conclusion
01:15
+
Data Types, Data Structures
18 Lectures 57:13

Python programs are a combination of modules, statements, expressions, and objects. Programs are generally composed of modules and/or statements. Modules make you to organize your program logically. Modules contain statements.

This lecture will introduce you to data types and data structures with Python, as well as what they accomplish.


Topics Covered Include:
  • What's Covered
  • Modules
  • Objects
Objects in Python
04:05

Identifiers and reserved words are the basic building blocks of a programming language. A Python identifier is a name which is used to identify a variable, function, class, module, or any other object.

This lecture will discuss how to identify and reserve words for Python, and what they are used for.

Topics Covered Include:
  • Identifier Words
  • Reserved Words
Identifiers and Reserved Words
01:29

Depending on the type of the variable, you can perform various operations on operands. Python has a rich set of operators. Remember the list is huge and you may not use all of them, even if you code programs for years.

This lecture will discuss the operators within Python, and what they are used for.

Topics Covered Include:
  • Operators
  • Order of Precedence
Operators
05:14

In Python, the most basic data structure used is the sequence of data. Each element of a sequence is assigned by a number, position, or index. I may say that the first index is zero, the second index is one, and so on. In Python, there are six built­in data types.

This lecture will discuss the data types within Python, and what each of them does.

Topics Covered Include:
  • Data Types
  • Sequence Types
  • Built-in Functions
Data Types
04:06

This lecture contains a demonstration on how to use functions.

Functions Demo
06:24

This lecture contains a demonstration on how to use strings.

Strings Demo
05:10

Chapter 1 Quiz
3 questions

Lists are the most versatile data type in Python. A list can be written as a list of values separated by commas within square brackets. Lists are mutable data types; meaning, lists can be modified and their items can be updated or changed.

This lecture will discuss the structures within Python, and what they do.

Topics Covered Include:
  • Lists
  • Built-in Functions and Methods
  • Tuple Functions and Operations
  • Tuples Built-in Functions
Structures in Python
06:49

This lecture contains a demonstration on how to use LISTS.

LISTS Demo
02:16

Dictionaries are one of the most flexible data types. A dictionary is mutable and is used as a container. A dictionary can store any number of Python items, including other container types.

This lecture will discuss the dictionaries within Python and what they do.

Topics Covered Include:
  • Dictionaries
  • Dictionary Keys
Dictionaries
03:31

A set is an unordered collection of unique items. In other words, an item can be inserted only once in a set; it doesn't matter how many times you add it or not. Because of its uniqueness, a set plays a major role in numeric and database applications.

This lecture will discuss the sets within Python, and what they do.

Topics Covered Include:
  • Sets
  • Sets Types
  • Built-in Set Functions
Sets
02:49

This lecture contains a demonstration on how to use Tuples.

Tuples Demo
02:28

In Python, files can be used to store data. It could be binary or text data. Text includes numbers, objects, etc. To be able to store data in a file, you will have to create one first. The open function creates a file if it does not exist.

This lecture will discuss the files within Python, and what they do.

Topics Covered Include:
  • File
  • Object and OS Methods
  • OS Module
Files
01:53

This lecture contains a demonstration on how to use dictionaries.

Dictionaries Demo
03:39

This lecture contains a demonstration on how to use file options.

File Operations Demo
01:52

Scoping variables is a very interesting topic. Python has two types of variables as far as scoping is concerned. They are global variables and local variables. Variables defined inside a function have local scope.

This lecture will discuss the scope of variables within Python, and what they are used for.

Topics Covered Include:
  • Python Variables
Scope of Variables
00:52

Python automatically removes unwanted objects such as built­in types, class instances, and functions, to free memory space. There are some technicalities behind this process. Python periodically retrieves blocks of memory that are no longer in use.

This lecture will discuss the way that memory is managed within Python.

Topics Covered Include:
  • Garbage Collector
  • Reference Count
Memory Management
01:46

In Python, the list methods can have stack implementations. In a stack, the last element added can be retrieved first. In other words, it can be described as “last-­in first­-out” or “first-­in last­-out”.

This lecture will discuss the data structures within Python, and what they do.

Topics Covered Include:
  • Stacks
  • Append Method
  • Pop Method
  • Queue
Data Structures
01:26

This lecture will take you through some of the key points covered throughout the second portion of this section. Upon Completion of this section you will be prepared to move on to the next Section: Control Flow, Functions, Classes and Object-Oriented Programming.

Conclusion
01:24
+
Control Flow, Functions, Classes and Object-Oriented Programming
19 Lectures 57:42

In this module, we will elaborate on what you have already learned and explain to you how control flow and functions work in Python. In this course, we will go deeper into the concepts of conditionals, functions, decorators, coroutines, recursion, and object­-oriented programming concepts.

This lecture will introduce you to controlling flow, functions, classes and object-oriented programming within Python.

Topics Covered Include:
  • Overview
  • Modules
  • Statements and Expressions
Program Execution
02:17

Decision making statements are one of the main building blocks of any language. You will have to make a decision when there are two or more options and you want the program to behave differently based on the outcome of the situation.

This lecture will discuss the importance of decision making within Python.

Topics Covered Include:
  • Decision Making Statements
  • Values
  • Boolean Operators
Decision Making
03:08

This lecture contains a demonstration on how to use conditional statements in Python.

Conditional Statements in Python Demo
01:35

Generally statements are executed in a sequential order. The only exception is when you use a conditional statement which can alter the flow. It is possible that you want to execute a block of code a certain number of times.

This lecture will discuss Loops within Python, and what they do.

Topics Covered Include:
  • Loops Statements
  • Break Statement
  • Continue Statement
  • Pass Statement
Loops
03:46

This lecture contains a demonstration on how to use repeated statements.

Repeat Statements Demo
05:00

A function is a block of code that performs a single, related action. Functions can be organized into reusable codes and provide enhanced modularity in coding. Functions enable easier maintenance.

This lecture will discuss the functions within Python, and what they do.

Topics Covered Include:
  • Functions
  • How do you define a function?
  • Parameters or Arguments
Functions in Python
05:07

This lecture contains a demonstration on how to use functions.

Functions Demo
02:37

When you invoke an argument, you may expect a return value. Sometimes you create a function and use it in an expression. It doesn't matter if it has a name or not. All you want is a returned value.

This lecture will discuss the anonymous functions within Python, and what they do.

Topics Covered Include:
  • Lambda Operator
  • Return Statement
  • Global Variables
Anonymous Functions
02:57

This lecture contains a demonstration on how to use Lambda functions and Argument passing.

Lambda Functions and Argument Passing Demo
03:35

Functions are generally called first­-class objects in Python. In other words, all objects that are named by an identifier have equal status. All named objects are treated as data including functions.

This lecture will discuss the variants of functions within Python, and what they do.


Topics Covered Include:
  • First-class Objects in Python
  • Yield Statement
  • List Comprehensions
Variants of Functions
06:17

Chapter 1 & 2 Quiz
4 questions

One of the key features of Python is its support to object orientation. Object-­oriented features such as classes that have data and methods are well supported. Python supports polymorphism, operator overloading, function overriding, etc.

This lecture will discuss the orientation of objects within Python, and what they do.

Topics Covered Include:
  • Python Supports
  • Object-Oriented
Object Orientation in Python
01:05

A class in Python can be defined using a class statement. Class has data defined in it and methods that operate on data. A class defines attributes that are associated with collections of objects, or instances.

This lecture will discuss the classes within Python, and what they are used for.

Topics Covered Include:
  • Class Features
  • Attributes
  • Classes
  • Garbage Collection
Classes
03:15

This lecture contains a demonstration on how to use classes.

Classes Demo
04:08

The original class is called a base class or a superclass. The new class obtained is called a derived class or a subclass. You can create class inheritance with a comma separated list of base-classes.

This lecture will discuss the properties of the classes within Python.

Topics Covered Include:
  • Inheritance of a Class
  • Inheritance
  • Derived Class
  • Method Overriding
Class Properties
01:09

This lecture contains a demonstration on how to use class inheritance and method overriding.

Class Inheritance and Method Overriding Demo
03:27

If you want to include some special functionality to your subclass, you can modify it. You can redefine the operators in a child class from what it was in a parent class.

This lecture will discuss the operator and method overloader within Python, and what they do.

Topics Covered Include:
  • Overloading
  • Method
  • Operator
  • Encapsulation
Operator and Method Overloading
02:21

This lecture contains a demonstration on how to use operator overloading, and data hiding.

Operator Overloading, Data Hiding Demo
03:34

Python offers a mechanism called “abstract base classes” to group objects of a similar class, defined interfaces, and type-checking. Abstract base classes are used in organizing objects into a hierarchy and making assertions about required methods.

This lecture will discuss abstract base classes within Python, and what they are used for.

Topics Covered Include:
  • Abstract Base Classes
  • Type Checking
Abstract Base Classes
01:04

This lecture will take you through some of the key points covered throughout the second portion of this section. Upon Completion of this section you will be prepared to move on to the next Section: Module, Packages and Importing Modules.

Conclusion
01:20
+
Module, Packages and Importing Modules
13 Lectures 29:15

In this course we will be talking about introduce modules and packages and how you can import and use them in your programs. As your programs grow in size, you will want to modularize them.

This lecture will introduce you to modules, packages, and importing module within Python.

Topics Covered Include:
  • Course Overview
Introduction
01:05

Modules are composed of Python definitions and statements in a file. You can create your module by adding the definitions and statements in a file and using the same name as the module.

This lecture will discuss modules within Python, and what they are used for.

Topics Covered Include:
  • Modules
  • Third-party Modules
Modules in Python
02:31

You will have to import a module before accessing any of its members. You can do so by using the import statement. Import statements can live anywhere in the program. Python source files can be used as a module, which is done by executing an import statement.

This lecture will discuss how to import modules within Python.

Topics Covered Include:
  • Importing a Module
  • Search Path
  • Dictionaries
  • From Statement
Importing a Module
05:37

This lecture contains a demonstration on how to import statements.

Import Statements Demo
02:56

Python source files can be executed in two ways. One is the import statement in its own namespace, which executes code as a library module. The second way is to execute the code as a main program or script.

This lecture will discuss the ways of executing modules within Python.

Topics Covered Include:
  • Execution of Modules
Execution of Modules
01:14

This lecture contains a demonstration on how to import modules through command prompt.

Importing Modules Through Command Prompt Demo
02:21

Now we're going to talk about how Python interpreter locates modules. The interpreter searches each of the directories in sys.path when looking for a module.

This lecture will discuss the ways of locating modules within Python.

Topics Covered Include:
  • Locating Modules
  • Sys.path
  • Unix Default Path
Locating Modules
02:05

In case of .py files, a module is imported first and then compiled into bytecode. Then it is written back to a disk as a .pyc file. In subsequent imports, Python checks the modification date and time of the source against the compiled version.

This lecture will discuss the ways of loading and compiling modules within Python.

Topics Covered Include:
  • .Py Files
  • Import Search
  • Compiled Search
  • Loading and Compiling
Loading and Compiling Module
01:47

The dir function returns the names defined by a module in a list. Each name will be a string. The list that is defined in a module consists of names of all the modules, variables, and functions.

This lecture will discuss the module functions within Python, and what they are used for.


Topics Covered Include:
  • Module Functions
  • Dictionary
  • Keys Function
Module Functions
00:56

Chapter 1 Quiz
3 questions

Packages allow a collection of modules to be grouped under a common package name. Each package consists of modules, subpackages, sub­subpackages, and so on. In Python, a package is defined as the application environment in a hierarchical file directory structure.

This lecture will introduce you to using packages within Python.


Topics Covered Include:
  • Packages
  • From Star
  • Relative Imports
Introduction
01:48

This lecture contains a demonstration on how to use packages.

Using Packages Demo
01:20

The distutils module is used to distribute Python programs. Organize your project files into a directory. Make sure you include a README file. This file supports documentation and your source code.

This lecture will discuss the distribution and installation of packages within Python.


Topics Covered Include:
  • Distributing Python Programs and Libraries
  • Modules and Packages
  • Distribution and Installation
Distribution and Installation
04:59

This lecture will take you through some of the key points covered throughout the second portion of this section. Upon Completion of this section you will be prepared to move on to the next Section: IO Handling.

Conclusion
00:36
+
IO Handling
14 Lectures 37:39

In this module, we will explain about the basics of Python's input and output functions. Programs normally involve taking input from one source and sending the processed input to a destination.

This lecture will introduce you to IO handling, and the components within.

Topics Covered Include:
  • Introduction
Introduction
01:13

You can write an error message to sys.stderrandyou can also raise a SystemExit exception with a non­zero exit code. This is a standard practice in any programming language. Python follows this norm. By default, stderr gets errors raised.

This lecture will discuss the input and output handling within Python, and what they are used for.

Topics Covered Include:
  • Command Line
  • sys.argv list
  • Input/Output Handling
  • Optparse
Input/Output Handling
02:23

The Python interpreter offers three standard file objects: standard input, standard output, and standard error. They are available in the sys module; Standard Input as sys.stdin, Standard Output as sys.stdout, and Standard Error as sys.stderr.

This lecture will discuss the standard inputs, outputs and errors within Python, and what they are used for.

Topics Covered Include:
  • Standard File Objects
Standard Input, Output, and Error
01:53

It is desirable to decouple the code that produces output from the code that directs the intended destination. Output of a program can be printed out or written to a file for future use. There are several ways to represent the output of a program.

This lecture will discuss handling the outputs from Python, and what they are used for.


Topics Covered Include:
  • Output Handling
  • Rjust and Ljust Functions
  • Yield Statement
Output Handling in Python
05:20

This lecture contains one of two demonstrations on how to format outputs.

Output Formatting Demo
05:12

This lecture contains the second of two demonstrations on how to format outputs.

Output Formatting 2 Demo
05:07

Inputs can be made readable through keyboard. Python has a built­in function that reads a textline received from standard input by default. The standard input normally comes from a keyboard.

This lecture will discuss the ways of handling inputs within Python, and what they are used for.

Topics Covered Include:
  • Input Functions
Input Handling
00:47

Files are a common medium to read data from and write into. There are built­in functions to open a file. If a file does not exist when you try to open in write mode, Python creates one. When you open a file, you specify the name, mode of operation, and buffer size.

This lecture will discuss the file objects within Python, and what they are used for.

Topics Covered Include:
  • Files
  • Mode of Operation
  • Files and File Objects
  • U or Ur Mode
Files and File Objects
02:50

This lecture contains a demonstration on how to format outputs.

Files that Read Demo
02:27

You can use encode and decode operators to convert a string to the proper unicode. Both operators require the use of a special encoding name that specifies how Unicode characters are mapped to a sequence of 8­bit characters in byte strings.

This lecture will discuss the ways of handling unicode strings within Python, and what they are used for.

Topics Covered Include:
  • Unicode String Handling
  • Unicode I/O
  • Open Function
  • Errors
Unicode String Handling in Python
04:26

This lecture contains a demonstration on how to use I/O output files.

Output File I/O Demo
01:31

Chapter 1 & 2 Quiz
5 questions

You can save a sequence of objects by issuing a series of dump operations sequentially. You can restore these objects by using a similar sequence of load operations.

This lecture will discuss the pickle and shelve concept within Python, and how it is used.


Topics Covered Include:
  • Pickle and Shelve
  • Getstate Method
  • Setstate Method
Pickle and Shelve
01:53

Strings are very easy to read from and write into a file. In the case of numbers, it is a bit complicated because the read method only returns strings. Those strings have to be passed to a function like int.

This lecture will discuss the ways of saving with JSON within Python.

Topics Covered Include:
  • JSON
Saving with JSON
01:17

This lecture will take you through some of the key points covered throughout the second portion of this section. Upon Completion of this section you will be prepared to move on to the next Section: Errors and Exceptions.

Conclusion
01:20
+
Errors and Exceptions
15 Lectures 31:43

Exceptions can point out and break the normal control flow of a program. Whenever an exception is raised, a message is left by Python. Python offers some great features for exception handling and debugging.

This lecture will introduce you to errors and exceptions within Python.

Topics Covered Include:
  • Introduction
Introduction
00:38

Python enables us to handle exceptions. Generally, there are two kinds of exceptions. One set of exceptions are not errors and the other set are errors. A program consists of a sequence of executable statements.

This lecture will discuss the ways of handling exceptions within Python.


Topics Covered Include:
  • Exceptions
  • Exception Handling
  • Stack Trace
Exception Handling
03:48

This lecture contains a demonstration on finding exceptions within Python.

Exceptions Demo
01:40

Catching exceptions is the first step in handling exceptions. We don't want a server program to go down when an error occurs. We would want it to handle the exception and continue to work.

This lecture will discuss the ways of catching exceptions within Python, and what will be done with them.

Topics Covered Include:
  • Catching Exceptions
  • Try Statements
Catching Exceptions
01:03

This lecture contains a demonstration on how to handle exceptions.

Handling Exceptions Demo
02:46

Python offers you some standard built­-in exception functions. Your scripts can also raise exceptions. That is, Python or your script may also raise exceptions. They may, or may not, be caught.

This lecture will discuss the ways of raising exceptions within Python.

Topics Covered Include:
  • Raising Exceptions
Raising Exceptions
00:53

You can use multiple except statements in a single try statement. It is quite useful to use multiple statements as they throw different types of exceptions. You can also offer a generic except clause to handle any exception that is raised.

This lecture will discuss the meaning of the else statement, and what it is used for.

Topics Covered Include:
  • Try Else
  • Try
  • Except Clauses
Else Statement
01:20

Chapter 1 Quiz
3 questions

You can define your own exceptions by creating a class in a program. You can also use standard built-­in exception functions based on your requirements. The raise statement, as we talked earlier, can raise an exception.

This lecture will introduce you to user defined exceptions.

Topics Covered Include:
  • User Defined Exceptions
Introduction
00:52

This lecture contains a demonstration on how to handle exceptions user defined exceptions.

User-defined Exceptions Demo
01:52

In Python, termination of exceptions can be done using try/finally statements. If you have any code that may raise an exception, you can secure your program by placing the suspicious code in a try block. Try statements may include finally blocks in your code.

This lecture will discuss Termination Actions within Python, and what they are used for.


Topics Covered Include:
  • Termination Actions
  • Arguments
  • Termination Statements
Termination Actions
02:27

This lecture contains a demonstration on how to use Try/Finally.

Try/Finally Demo
03:31

This lecture contains a demonstration on how to use With Statement.

With Statement Demo
01:18

Built­in exceptions are generally defined as classes. If you want to catch exceptions from a particular group, you can specify the group name in an except clause. The exceptions are grouped according to whether or not the exceptions are related to the program exit.

This lecture will discuss the built-in exceptions within Python.

Topics Covered Include:
  • Built-in Exceptions
  • Inheritance Method
  • Classes
  • BaseException
Built-In Exceptions
06:53

Python has a warnings module to notify developers about deprecated features. Warnings are issued by a library module even though the names of various warnings are built-­in. Built­-in warnings are somewhat similar to built­in exceptions.

This lecture will discuss the built-in warnings and clean-up actions within Python.

Topics Covered Include:
  • Built-in Warnings
  • Warning
  • Clean-up Actions
  • Try Statements
Built-In Warnings and Clean-up Actions
01:58

This lecture will take you through some of the key points covered throughout the second portion of this section. Upon Completion of this section you will be prepared to move on to the next Section: Testing, Debugging, Profiling, and Tuning.

Conclusion
00:44
+
Testing, Debugging, Profiling, and Tuning
14 Lectures 42:04

Welcome to our course on testing, debugging, profiling, and tuning scripts in Python. In this module, we will explain how Python helps you to test, debug, profile, and tune programs using in­built utilities.

This lecture will introduce you to testing, debugging, profiling, and tuning, within Python.


Topics Covered Include:
  • Interpreted Language
  • Improving Performance
  • Profiling
Introduction
04:23

Before you distribute a Python code, you will definitely want to test the program, or the set of programs that make up an application thoroughly. Testing as you are aware is the process of running software to look for errors.

This lecture will discuss testing within Python.

Topics Covered Include:
  • Testing
  • Documentation String

Testing
02:27

It is very difficult to keep the documentation up-­to-­date. Programmers tend to fix bugs and move to the next ones in the priority list. Many of them wouldn't be too keen in keeping documentation up-­to­-date.

This lecture will discuss the DocTest module, and how it is used within Python.

Topics Covered Include:
  • DocTest Module
  • Testmod Function
DocTest Module
03:21

Python provides a unittest module to help in unit testing. You can use the unittest module for exhaustive program testing. This is where it differentiates from doctest. Using unittest, programmers can write test cases for each element of a program.

This lecture will discuss the UnitTest module, and how it is used in Python.

Topics Covered Include:
  • UnitTest Module
  • Costomized Options
  • Unittest.TestCase Methods
UnitTest Module
03:45

Pytest enables you to write programs in an enhanced way. Py-test runs on Windows and supports Python versions 2.6 and up. It also runs on PyPy and Jython­2.5.1. Pytest is very strict about backward compatibility and provides many third­-party plugins and built­-in fixtures.

This lecture will discuss the tools used for UnitTesting.

Topics Covered Include:
  • UniTesting Tools
  • Pytest
  • Nose
UnitTesting Tools
02:05

Python has a command­line based debugger available in the pdb module. Pdb supports post­mortem debugging and the inspection of stack frames. It allows you to set­up break­points and jump to those points while debugging code.

This lecture will discuss the ways of debugging Python.

Topics Covered Include:
  • Debugging
  • Run Function
  • Runeval
  • Runcall
Debugging in Python
03:25

This lecture contains a demonstration on how to use the DocTest and UniTest within Python.

DocTest and UnitTest Demo
02:50

Chapter 1 Quiz
3 questions

What do you look for when you profile a program? You look for coverage information and performance statistics. You also look for how often various parts of a program get executed. You would want to know how long a part of the program takes to execute.

This lecture will introduce you to profiling and tuning Python programs.


Topics Covered Include:
  • Deterministic Profiling
  • Call Count Statistics
  • Profiling Python Programs
Profiling Python Programs
02:50

This lecture contains a demonstration on how to use PDB and cProfile within Python.

PDB and cProfile Demo
02:44

Python has a simple command-­based debugger which is found in the pdb module. Post­mortem debugging, breakpoints, source code listing, inspection of stack frames, and evaluation of codes are supported by the pdb module.

This lecture will discuss how to tune Python programs.


Topics Covered Include:
  • Time Measurements
  • Associated Speedup
  • Disassembly
Tuning of Python Programs
03:18

Some of the techniques, or steps, to employ when measuring the performance of programs, are not extensive, but they do provide some ideas to programmers when they look at their own code.

This lecture will discuss the strategies for tuning performance within Python.

Topics Covered Include:
  • Tuning Strategies
  • Library Modules
Performance Tuning Strategies
04:31

This lecture contains a demonstration on how to use time and memory measurement within Python.

Time and Memory Measurements Demo
02:05

This lecture contains a demonstration on how to tune Python.

Tuning Demo
03:05

This lecture will take you through some of the key points covered throughout the second portion of this section. Upon Completion of this section you will be prepared to move on to the next Section: LAN Switching and WAN Technologies.

Conclusion
01:15
14 More Sections
About the Instructor
LearnSmart LLC
4.2 Average rating
8,256 Reviews
74,181 Students
67 Courses
Smarter Training. Never Open a Textbook.

LearnSmart has served the learning community with high-quality professional skills and IT certification training since 1997. In that time, the company has helped thousands earn career-related certifications from respected vendors, such as Project Management Institute (PMI)®, Cisco, Microsoft, CompTIA, Oracle, and EC-Council. LearnSmart offers over 1,000 courses covering IT, project management, administrative, HR, and workplace safety topics. With a rapidly growing clientele of individuals and corporations, LearnSmart serves a broad range of Fortune 500 companies to universities, as well as government institutions and the armed forces.

LearnSmart is able to meet diverse career and learning needs through its extensive selection of training. LearnSmart uses industry experts to give learners the most up-to-date content in a video format as well as training resources including; reference tools, pretests, study guides and labs. For more information about how we can help pinpoint and solve your individual or multi-user training challenges.

PMI is a registered trademark of the Project Management Institute, Inc.