ehmatthes/intro_programming — pull request #59 by ehmatthes (2014-01-02 17:54:29+00:00)
Title: Exercise: Refining Shuttle.

This starts the section on importing classes and modules. It would be nice for these examples if we could import from a previous cell, but in a normal ipynb there is no need to do that, because all cells share a namespace.

This means we have to keep any modules that need to be imported in a file in the /notebooks directory. This introduces redundancy, which will be important to stay aware of. For example, the section asks readers to save rocket.py as a module, and import rocket into rocket_game.py. The code for rocket.py is shown in the notebook, but it also needs to be saved in the /notebooks directory for the `import rocket` command to work in the next cell.