Код: Выделить всё
# module1.py
import module2
def function1():
module2.function2()
def function3():
print('Goodbye, World!')
Код: Выделить всё
# module2.py
import module1
def function2():
print('Hello, World!')
module1.function3()
Код: Выделить всё
# __init__.py
import module1
module1.function1()
Подробнее здесь: https://stackoverflow.com/questions/682 ... rts-python
Мобильная версия