Skip to content

Latest commit

 

History

History

0x02-python-import_modules

img

import, modules and commandline arguments

Intro

In this session, we will explore importin modules, packages and how to use commandline arguments in python.

Resources

  1. Modules
  2. Commandline arguments
  3. Code styling

Learning objectives

By the end of this session, you should be able to explain to anyone without the help of Google the following concepts

  • How to import functions from another file
  • How to use imported functions
  • How to create a module
  • How to use the built-in function dir()
  • How to prevent code in your script from being executed when imported
  • How to use command line arguments with your Python programs

Script Requirements

  • Allowed editors: vi, vim, emacs
  • All your files will be interpreted/compiled on Ubuntu 20.04 LTS using python3 (version 3.8.5)
  • All your files should end with a new line
  • The first line of all your files should be exactly #!/usr/bin/python3
  • Your code should use the pycodestyle (version 2.8.*)
  • All your files must be executable

Quizes

Quiz

back