from Pycon import ShotDown

by jesse in ,

Well my PyCon tutorial got shot down. Part of me expected it: It was aimed at fairly new Python programmers (and it's also the first tutorial of that type I've put together outside of work that's aimed at this type of audience). For those of you who care, here is the outline. I probably should have added a lot of spit and polish, but I waffled about submitting it and misstepped.

Introduction to Python, without the Bells and Whistles, but batteries included!

Intended audience: This talk assumes little to no familiarity with Python, and is geared towards new developers. Some scripting knowledge and/or programming knowledge is required.

Summary of proposed presentation: This talk focuses on the new python programmer, introducing them to the "python way" - everything from types to basic python structures, this talk focuses on the meat-and-potatoes aspect of getting started, finding information and building the basic application. Modules that are not in the standard library are not covered, as well as platform-specific differences between modules/CPython implementations.

Presentation outline:

Python: Getting Started

  • The interactive interpreter
    • Hello World

What's the difference?

  • Modules (What is a module?)
  • Packages (What is a package?)
  • Scripts (What is a script/application?)


    • sys.path()
  • What is a namespace?
  • How import(s) affect the namespace

Building up the Basic script ( hello world )

  • Basic PEP 8 guidelines
  • Starting with a #!
  • What is __main__?
    • explain what happens when the if __name__ check does not exist, but a function call like main() exists, how does this affect import?

The Standard Library

  • Where to get information on the web
  • How to use dir() and help() inside the interpreter
  • Pydoc
  • Finding examples on the web
    • Python-Dev
    • Python-Tutors
    • Google Code search
    • Krugle

A quick Type overview

  • strings, ints, floats and longs
  • dicts, lists, tuples
  • Booleans
  • Finding the type()

Built In Functions

  • str() and it's methods
  • file()
    • basic I/O with file
  • dir()
  • Where to find more information on builtins

Basic Code Structure(s)

  • If, For, While
  • Loops and Range
  • Comprehensions
  • Generators at a glance


  • arguments by name, position
  • *kwargs, *args, *kvargs
  • Function Scope

Fundamental Low Level packages:

  • os/os.path
  • sys
  • subprocess in brief (simple: Not platform specific)

Classes and Objects

  • The basic class structure, self, __init__
  • Methods
  • Scope/Namespace
  • Inheritance at a glance
  • multiple inheritance


  • Basic builtin exceptions
  • Making your Own
  • When to raise