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