Python I: Essentials (2.X)


Request an offer for delivery of this course

Course duration

Course Outline

This Python Essentials training leads the student from the basics of writing and running Python scripts to more advanced features such as file operations, regular expressions, working with binary data, and using the extensive functionality of Python modules. Extra emphasis is placed on features unique to Python, such as tuples, array slices, and output formatting. This is a hands-on programming class. All concepts are reinforced by informal practice during the lecture followed by graduated lab exercises.

The course is appropriate for advanced users, system administrators and web site administrators who want to use Python to support their server installations, as well as anyone else who wants to automate or simplify common tasks with the use of Python scripts.

  1. An overview of Python
    1. What is python?
    2. Python Timeline
    3. Advantages/Disadvantages of Python
    4. Getting help with pydoc
  2. The Python Environment
    1. Starting Python
    2. Using the interpreter
    3. Running a Python script
    4. Python scripts on Unix/Windows
    5. Editors and IDEs
  3. Getting Started
    1. Using variables
    2. Builtin functions
    3. Strings
    4. Numbers
    5. Converting among types
    6. Writing to the screen
    7. Command line parameters
  4. Flow Control
    1. About flow control
    2. White space
    3. Conditional expressions
    4. Relational and Boolean operators
    5. While loops
    6. Alternate loop exits
  5. Sequences
    1. About sequences
    2. Lists and list methods
    3. Tuples
    4. Indexing and slicing
    5. Iterating through a sequence
    6. Sequence functions,keywords, and operators
    7. List comprehensions
    8. Nested sequences
  6. Working with files
    1. File overview
    2. Opening a text file
    3. Reading a text file
    4. Writing to a text file
    5. Screen output without formatting
    6. Raw (binary) data
  7. Dictionaries and Sets
    1. About dictionaries
    2. Creating dictionaries
    3. Iterating through a dictionary
    4. About sets
    5. Creating sets
    6. Working with sets
  8. Functions
    1. About sequences
    2. Function parameters
    3. Global variables
    4. Global scope
    5. Returning values
    6. Creating a library of functions
  9. Sorting
    1. The sorted() function
    2. Alternate keys
    3. Lambda functions
    4. Sorting collections
    5. Using operator.itemgetter()
    6. Reverse sorting
  10. Errors and Exception Handling
    1. Syntax errors
    2. Exceptions
    3. Using try/catch/else/finally
    4. Handling multiple exceptions
    5. Ignoring exceptions
  11. Using Modules
    1. The import statement
    2. Module search path
    3. Zipped libraries
    4. Creating Modules
    5. Function and Module aliases
  12. Regular Expressions
    1. RE syntax overview
    2. Basic patterns
    3. RE Objects
    4. Searching and matching
    5. Compilation flags
    6. Grouping
    7. Replacing text
    8. Splitting a string
  13. Using the Standard Library
    1. The sys module
    2. Launching external programs
    3. Walking directory trees
    4. Grabbing web pages
    5. Sending e-mail
    6. Paths, directories, and filenames
    7. Math functions
    8. Random numbers
    9. Dates and times
    10. Zipped archives
  14. An Introduction to Python classes
    1. About o-o programming
    2. Defining classes
    3. Constructors
    4. Instance methods
    5. Instance data
    6. Class methods and data
    7. Destructors
  15. Bonus Exercises

InterSource Geneva, a premier Information Technology training firm, offers over 400 different courses on server, database and programming technologies, as well as end-user classes for the most popular office, graphics and design applications. We serve clients in Switzerland (Geneva, Lausanne, Bern, Basel, Zurich) and throughout Europe (France, Germany, Austria, Finland, Sweden, England, Netherlands, Spain, etc.).

InterSource offers custom, private courses at client sites, standard public courses in our Geneva classroom, and online training via live Web conference. Training is offered in English and many other languages (Francais, Deutsch, Espanol, Italiano.)

For an overall view of our offerings, please visit us at