Skip to content

Instantly share code, notes, and snippets.

@karanparikh
Created July 2, 2011 03:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karanparikh/1059713 to your computer and use it in GitHub Desktop.
Save karanparikh/1059713 to your computer and use it in GitHub Desktop.
Python simple import
# import a specific module
from vehicle.four_wheels import car
my_car = car.Car(transmission="automatic")
# import a specific class within a module
from vehicle.four_wheels.car import Car
my_car = Car(transmission="automatic")
# import everything from a module into the current namespace
from vehicle.four_wheels import *
my_car = Car(transmission="automatic")
my_bus = Bus(color="Yellow")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment