scripts: Disabled local import hack on import

Moved local import hack behind if __name__ == "__main__"

These scripts aren't really intended to be used as python libraries.
Still, it's useful to import them for debugging and to get access to
their juicy internals.
This commit is contained in:
Christopher Haster
2024-12-27 00:08:08 -06:00
parent 762dd6120f
commit 62cc4dbb14
31 changed files with 62 additions and 31 deletions

View File

@@ -10,7 +10,8 @@
#
# prevent local imports
__import__('sys').path.pop(0)
if __name__ == "__main__":
__import__('sys').path.pop(0)
import bisect
import codecs