Ejemplo n.º 1
0
class Wing(object):

    def __init__(self):
        self.wheel = Wheel()

    def lift_ailerons(self):
        pass

    def land_plane(self):
        self.wheel.turn()
Ejemplo n.º 2
0
 def __init__(self):
     self.wheel = Wheel()
#!/usr/bin/env python




print '''
          This script is stored outside the package structure.
          IT WON'T WORK.
          We can't find the files we need, because:
              * the Python interpreter looks for the package,
                starting in the directory where this script is 
                located, but we are already inside the top-level package,
                ('vehicle'), so our name resolution fails.
      '''

from vehicle.car.wheels import Wheel
from vehicle.plane.wings import Wing


wheel = Wheel()
wheel.turn()