$ cat > main.py <<\EOF"""this is how we are actually calling class1.py and from that file loading Class1"""from class1 import Class1"""this is how we are actually calling class2.py and from that file loading Class2"""from class2 import Class2
print Class1.OKprint Class2.OKEOF
# My Python version: 3.7# IDE: Pycharm 2021.1.2 Community
# Have "myLib" in folder "labs":
class Points:def __init__(self, x = 0, y = 0):self.__x = xself.__y = ydef __str__(self):return f"x = {self.__x}, y = {self.__y}"
# Have "myFile" in (same) folder "labs":
from myFile import Point
p1 = Point(1, 4)p2 = Point(1, 4)print(f"p1: {p1}, p2: {p2}")
# Result:# p1: x = 1, y = 4, p2: x = 1, y = 4
# Good Luck!