Как импортировать скрипт Python из родственного каталога?Python

Программы на Python
Anonymous
Как импортировать скрипт Python из родственного каталога?

Сообщение Anonymous »


Let's say I have the following directory structure:

parent_dir/ foo_dir/ foo.py bar_dir/ bar.py If I wanted to import bar.py from within foo.py, how would I do that?


Источник: https://stackoverflow.com/questions/102 ... -directory

Вернуться в «Python»