• Online, Self-Paced
Course Description

In this 11-video course, learners can examine different types of exceptions that can be raised in Python and how they can be handled with except blocks. Explore execution of Python scripts from the command line, including use and parsing of command-line arguments. To begin, use a try and except block to handle a Python exception, then learn how to handle exceptions that your code may raise. Explore how exceptions are defined in a hierarchy and how related exceptions are caught and handled. Next, define multiple except blocks to handle various exceptions that can be raised by code; convert code prototyped in a Jupyter notebook into a Python script that can be executed from a shell, and run code from the Python shell and execute single-line and multi-line commands. Learn about parsing command line arguments, and use the sys and argparse module to access command-line arguments to a Python script, then parse and use the arguments passed to a Python script from the command line. Finally, learn to define command-line arguments by using argparse.

Learning Objectives

{"discover the key concepts covered in this course"}

Framework Connections

The materials within this course focus on the NICE Framework Task, Knowledge, and Skill statements identified within the indicated NICE Framework component(s):

Specialty Areas

  • Software Development