|
% cat calc.py
from config import *
print("KK0:kpi =",kpi)
import shape
print(shape.area.circle(4))
print(shape.area.square(4))
print(shape.volume.sphere(4))
print(shape.volume.cube(4))
from shape import area,volume
print(area.circle(4))
print(area.square(4))
print(volume.sphere(4))
print(volume.cube(4))
% cat shape/__init__.py
from shape import area
from shape import volume
% cat calc2.py
from config import *
print("KK0:kpi =",kpi)
import shape
from shape import area
print(shape.area.circle(4))
print(area.square(4))
from shape import volume
print(volume.sphere(4))
from shape.volume import *
print(cube(4))
|
|