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
+1
View File
@@ -10,6 +10,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import collections as co
+1
View File
@@ -12,6 +12,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import glob
+1
View File
@@ -13,6 +13,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import collections as co
+1
View File
@@ -13,6 +13,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import collections as co
+1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import io
+1
View File
@@ -11,6 +11,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import collections as co
+1
View File
@@ -10,6 +10,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import collections as co
+1
View File
@@ -13,6 +13,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import collections as co
+1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import os
+1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import bisect
+1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import bisect
+1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import os
+1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
+1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import bisect
+1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import bisect
+1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import bisect
+1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import io
+1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import io
+1
View File
@@ -11,6 +11,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import bisect
+1
View File
@@ -12,6 +12,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import bisect
+1
View File
@@ -10,6 +10,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import bisect
+1
View File
@@ -10,6 +10,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import codecs
+1
View File
@@ -11,6 +11,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import io
+1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import subprocess as sp
+1
View File
@@ -11,6 +11,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import collections as co
+1
View File
@@ -10,6 +10,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import collections as co
+1
View File
@@ -10,6 +10,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import collections as co
+1
View File
@@ -10,6 +10,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import os
+1
View File
@@ -10,6 +10,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import collections as co
+1
View File
@@ -10,6 +10,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import collections as co
+1
View File
@@ -11,6 +11,7 @@
#
# prevent local imports
if __name__ == "__main__":
__import__('sys').path.pop(0)
import collections as co