Skip to Content
Secret Recipes of the Python Ninja
book

Secret Recipes of the Python Ninja

by Cody Jackson
May 2018
Intermediate to advanced content levelIntermediate to advanced
380 pages
9h 37m
English
Packt Publishing
Content preview from Secret Recipes of the Python Ninja

How to do it...

  1. When making a package, follow the normal filesystem hierarchy in terms of directory structure; that is, modules that relate to each other should be placed in their own directory.
  2. A possible package for a video file handler is shown in package_tree.py:
      video/                  # Top-level package          __init__.py         # Top-level initialization          formats/            # Sub-package for file formats              __init__.py     # Package-level initialization              avi_in.py              avi_out.py              mpg2_in.py              mpg2_out.py              webm_in.py              webm_out.py          effects/             # Sub-package for video effects              specialFX/       # Sub-package for special effects                  __init__.py                  sepia.py                  mosaic.py                  old_movie.py                  glass.py                  pencil.py                  tv.py              transform/        # Sub-package for transform effects                  __init__.py                  flip.py                  skew.py                  rotate.py                  mirror.py                  wave.py broken_glass.py ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The Expanding World of Python

The Expanding World of Python

Dane Hillard

Publisher Resources

ISBN: 9781788294874Supplemental Content