Getting Started with Python on Ubuntu - Running from the Command Line Lab

Up to this point, you have run your Python scripts from inside Geany. Doing so is fine when a program is under development. Once development has been completed, there are many other options available to you, depending on your needs. In this lab, you will explore several different approaches, including the Python command, directly using the shebang, absolute paths, and relative paths. You will also redirect standard input (stdin) and standard output (stdout) to and from your program and disk files, which really helps harness the power of CLI programs. As before, the focus will be on debugging and problem solving. In Task 1, you will explore running your script from the command line using Python. You’ll also work with stdin, stdout, and the time module. In Task 2, you’ll examine other ways of running your scripts

Overview

Up to this point, you have run your Python scripts from inside Geany. Doing so is fine when a program is under development. Once development has been completed, there are many other options available to you, depending on your needs. In this lab, you will explore several different approaches, including the Python command, directly using the shebang, absolute paths, and relative paths. You will also redirect standard input (stdin) and standard output (stdout) to and from your program and disk files, which really helps harness the power of CLI programs. As before, the focus will be on debugging and problem solving. In Task 1, you will explore running your script from the command line using Python. You’ll also work with stdin, stdout, and the time module. In Task 2, you’ll examine other ways of running your scripts

Learning Partner
Infosec Learning
Infosec Learning
Infosec Learning provides businesses, colleges, governments, and K-12 school districts a feature rich information technology training and skill assessment service via an advanced, cloud based, virtual machine powered platform, capable of significant customization with unlimited scale and growth potential.