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