Ejemplo n.º 1
0
#import ecommerce.sales
from ecommerce.shopping import sales
# Creating Modules

# from sales import calc_tax, calc_shipping
import sys

sales.calc_shipping()
sales.calc_tax()


# Complied Python Files

# NOTE __pycache__
# complied versions of modules in our program like sales.py
# speeds up module loading
# It checks the date time of compiled versions and source code


# Module Search Path

print(sys.path)


# Packages


# Sub Packages


# Intra Package Refrences
Ejemplo n.º 2
0
""" ecommerce is considered a package here"""

from ecommerce.shopping.sales import calc_shipping, calc_tax

import ecommerce.shopping.sales
import sys

calc_tax()
calc_shipping()

print(sys.path)
Ejemplo n.º 3
0
# from ecommerce.sales import calc_shipping, calc_tax
from ecommerce.shopping import sales
import sys

# import ecommerce.sales  # second way

print(sales.calc_shipping(56))

print(sales.calc_shipping(56))  # second way