2 years ago

#59844

test-img

VIPPER

Block imports for some scripts in __init__.py

Is it possible to block imports o library for the specified files? Let's say I have 2 scripts:/path/to/script/1/script.py and /path/to/script/2/script.py. In both I would like to import some lib.py. Is it possible to write __init.py__ so it would block importing library for the first script but not for a second one?

python

import

lib

0 Answers

Your Answer

Accepted video resources