import, modules and commandline arguments
In this session, we will explore importin modules, packages and how to use commandline arguments in python.
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
- 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