about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]example/asm/shellcode.py2
-rwxr-xr-x[-rw-r--r--]example/jitter/arm.py2
-rwxr-xr-x[-rw-r--r--]example/jitter/arm_sc.py2
-rwxr-xr-x[-rw-r--r--]example/jitter/example_types.py2
-rwxr-xr-x[-rw-r--r--]example/jitter/mips32.py2
-rwxr-xr-x[-rw-r--r--]example/jitter/msp430.py2
-rw-r--r--miasm2/analysis/disasm_cb.py1
-rw-r--r--miasm2/analysis/gdbserver.py1
-rw-r--r--miasm2/analysis/machine.py1
-rw-r--r--miasm2/arch/aarch64/arch.py1
-rw-r--r--miasm2/arch/aarch64/ira.py1
-rw-r--r--miasm2/arch/aarch64/regs.py1
-rw-r--r--miasm2/arch/arm/arch.py1
-rw-r--r--miasm2/arch/arm/ira.py1
-rw-r--r--miasm2/arch/arm/regs.py1
-rw-r--r--miasm2/arch/mips32/arch.py1
-rw-r--r--miasm2/arch/mips32/ira.py1
-rw-r--r--miasm2/arch/mips32/regs.py1
-rw-r--r--miasm2/arch/msp430/arch.py1
-rw-r--r--miasm2/arch/msp430/ira.py1
-rw-r--r--miasm2/arch/msp430/sem.py1
-rw-r--r--miasm2/arch/sh4/arch.py1
-rw-r--r--miasm2/arch/x86/arch.py1
-rw-r--r--miasm2/arch/x86/ira.py1
-rw-r--r--miasm2/core/asmbloc.py1
-rw-r--r--miasm2/core/cpu.py1
-rw-r--r--miasm2/core/parse_asm.py1
-rw-r--r--miasm2/expression/__init__.py1
-rw-r--r--miasm2/expression/modint.py1
-rw-r--r--miasm2/ir/analysis.py1
-rw-r--r--miasm2/ir/ir.py1
-rw-r--r--miasm2/jitter/csts.py1
-rw-r--r--miasm2/jitter/jitcore_cc_base.py1
-rw-r--r--miasm2/jitter/jitcore_gcc.py1
-rw-r--r--miasm2/jitter/jitcore_tcc.py1
-rw-r--r--miasm2/jitter/jitload.py1
-rw-r--r--miasm2/os_dep/linux_stdlib.py1
-rw-r--r--miasm2/os_dep/win_api_x86_32_seh.py1
-rw-r--r--test/arch/aarch64/unit/asm_test.py8
-rwxr-xr-x[-rw-r--r--]test/arch/aarch64/unit/mn_ubfm.py3
-rwxr-xr-x[-rw-r--r--]test/arch/arm/sem.py2
-rw-r--r--test/arch/mips32/unit/asm_test.py8
-rwxr-xr-x[-rw-r--r--]test/arch/mips32/unit/mn_bcc.py3
-rwxr-xr-x[-rw-r--r--]test/arch/msp430/sem.py2
-rwxr-xr-x[-rw-r--r--]test/arch/x86/sem.py2
-rw-r--r--test/arch/x86/unit/asm_test.py8
-rwxr-xr-x[-rw-r--r--]test/arch/x86/unit/mn_daa.py2
-rwxr-xr-x[-rw-r--r--]test/arch/x86/unit/mn_das.py3
-rwxr-xr-x[-rw-r--r--]test/arch/x86/unit/mn_float.py2
-rwxr-xr-x[-rw-r--r--]test/arch/x86/unit/mn_int.py2
-rwxr-xr-x[-rw-r--r--]test/arch/x86/unit/mn_pcmpeq.py3
-rwxr-xr-x[-rw-r--r--]test/arch/x86/unit/mn_pextr.py3
-rwxr-xr-x[-rw-r--r--]test/arch/x86/unit/mn_pinsr.py3
-rwxr-xr-x[-rw-r--r--]test/arch/x86/unit/mn_pmaxu.py2
-rwxr-xr-x[-rw-r--r--]test/arch/x86/unit/mn_pminu.py2
-rwxr-xr-x[-rw-r--r--]test/arch/x86/unit/mn_pmovmskb.py3
-rwxr-xr-x[-rw-r--r--]test/arch/x86/unit/mn_pshufb.py2
-rwxr-xr-x[-rw-r--r--]test/arch/x86/unit/mn_psrl_psll.py2
-rwxr-xr-x[-rw-r--r--]test/arch/x86/unit/mn_punpck.py2
-rwxr-xr-x[-rw-r--r--]test/arch/x86/unit/mn_pushpop.py3
-rwxr-xr-x[-rw-r--r--]test/arch/x86/unit/mn_seh.py2
-rwxr-xr-x[-rw-r--r--]test/arch/x86/unit/mn_stack.py3
-rwxr-xr-x[-rw-r--r--]test/arch/x86/unit/mn_strings.py2
-rwxr-xr-x[-rw-r--r--]test/core/interval.py2
-rwxr-xr-x[-rw-r--r--]test/core/parse_asm.py2
-rwxr-xr-x[-rw-r--r--]test/core/test_types.py2
-rwxr-xr-x[-rw-r--r--]test/core/utils.py3
-rwxr-xr-x[-rw-r--r--]test/expression/expression_helper.py2
-rwxr-xr-x[-rw-r--r--]test/expression/stp.py2
-rw-r--r--[-rwxr-xr-x]test/ir/analysis.py0
-rwxr-xr-x[-rw-r--r--]test/ir/ir2C.py2
-rwxr-xr-x[-rw-r--r--]test/ir/symbexec.py2
-rwxr-xr-x[-rw-r--r--]test/os_dep/win_api_x86_32.py2
-rwxr-xr-x[-rw-r--r--]test/test_all.py2
74 files changed, 49 insertions, 93 deletions
diff --git a/example/asm/shellcode.py b/example/asm/shellcode.py
index f31c88c2..3ff11489 100644..100755
--- a/example/asm/shellcode.py
+++ b/example/asm/shellcode.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
 from argparse import ArgumentParser
 from pdb import pm
 
diff --git a/example/jitter/arm.py b/example/jitter/arm.py
index 7bd354bc..eac6c0e6 100644..100755
--- a/example/jitter/arm.py
+++ b/example/jitter/arm.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python2
 #-*- coding:utf-8 -*-
 import logging
 from pdb import pm
diff --git a/example/jitter/arm_sc.py b/example/jitter/arm_sc.py
index ca765d31..6644a440 100644..100755
--- a/example/jitter/arm_sc.py
+++ b/example/jitter/arm_sc.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python2
 #-*- coding:utf-8 -*-
 from miasm2.analysis.sandbox import Sandbox_Linux_armb_str
 from miasm2.analysis.sandbox import Sandbox_Linux_arml_str
diff --git a/example/jitter/example_types.py b/example/jitter/example_types.py
index c37c3b84..7ed964c2 100644..100755
--- a/example/jitter/example_types.py
+++ b/example/jitter/example_types.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python2
 """This script is just a short example of common usages for miasm2.core.types.
 For a more complete view of what is possible, tests/core/types.py covers
 most of the module possibilities, and the module doc gives useful information
diff --git a/example/jitter/mips32.py b/example/jitter/mips32.py
index a03cac8e..7c8900f8 100644..100755
--- a/example/jitter/mips32.py
+++ b/example/jitter/mips32.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python2
 #-*- coding:utf-8 -*-
 from argparse import ArgumentParser
 from miasm2.analysis import debugging
diff --git a/example/jitter/msp430.py b/example/jitter/msp430.py
index 89ecd930..5c8b7197 100644..100755
--- a/example/jitter/msp430.py
+++ b/example/jitter/msp430.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python2
 #-*- coding:utf-8 -*-
 from argparse import ArgumentParser
 from miasm2.analysis import debugging
diff --git a/miasm2/analysis/disasm_cb.py b/miasm2/analysis/disasm_cb.py
index b6c4351d..f1f23377 100644
--- a/miasm2/analysis/disasm_cb.py
+++ b/miasm2/analysis/disasm_cb.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 from miasm2.expression.expression import ExprInt, ExprId, ExprMem, MatchExpr
diff --git a/miasm2/analysis/gdbserver.py b/miasm2/analysis/gdbserver.py
index cbc8fe8d..dbf1b3b6 100644
--- a/miasm2/analysis/gdbserver.py
+++ b/miasm2/analysis/gdbserver.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 import socket
diff --git a/miasm2/analysis/machine.py b/miasm2/analysis/machine.py
index 6215a21b..7a6069c0 100644
--- a/miasm2/analysis/machine.py
+++ b/miasm2/analysis/machine.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 
diff --git a/miasm2/arch/aarch64/arch.py b/miasm2/arch/aarch64/arch.py
index b495821b..c875d787 100644
--- a/miasm2/arch/aarch64/arch.py
+++ b/miasm2/arch/aarch64/arch.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 import logging
diff --git a/miasm2/arch/aarch64/ira.py b/miasm2/arch/aarch64/ira.py
index 3f610360..1c2d0ae9 100644
--- a/miasm2/arch/aarch64/ira.py
+++ b/miasm2/arch/aarch64/ira.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 from miasm2.expression.expression import *
diff --git a/miasm2/arch/aarch64/regs.py b/miasm2/arch/aarch64/regs.py
index 6130d075..95527be3 100644
--- a/miasm2/arch/aarch64/regs.py
+++ b/miasm2/arch/aarch64/regs.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 from miasm2.expression.expression import *
diff --git a/miasm2/arch/arm/arch.py b/miasm2/arch/arm/arch.py
index 04e47585..0e58008d 100644
--- a/miasm2/arch/arm/arch.py
+++ b/miasm2/arch/arm/arch.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 import logging
diff --git a/miasm2/arch/arm/ira.py b/miasm2/arch/arm/ira.py
index b279fab5..4af7b753 100644
--- a/miasm2/arch/arm/ira.py
+++ b/miasm2/arch/arm/ira.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 from miasm2.expression.expression import *
diff --git a/miasm2/arch/arm/regs.py b/miasm2/arch/arm/regs.py
index 1393c372..a44878a8 100644
--- a/miasm2/arch/arm/regs.py
+++ b/miasm2/arch/arm/regs.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 from miasm2.expression.expression import *
diff --git a/miasm2/arch/mips32/arch.py b/miasm2/arch/mips32/arch.py
index 38ed2811..2ac16770 100644
--- a/miasm2/arch/mips32/arch.py
+++ b/miasm2/arch/mips32/arch.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 import logging
diff --git a/miasm2/arch/mips32/ira.py b/miasm2/arch/mips32/ira.py
index de508e41..fd951791 100644
--- a/miasm2/arch/mips32/ira.py
+++ b/miasm2/arch/mips32/ira.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 from miasm2.expression.expression import *
diff --git a/miasm2/arch/mips32/regs.py b/miasm2/arch/mips32/regs.py
index b64b40d5..974d3a2b 100644
--- a/miasm2/arch/mips32/regs.py
+++ b/miasm2/arch/mips32/regs.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 from miasm2.expression.expression import ExprId
diff --git a/miasm2/arch/msp430/arch.py b/miasm2/arch/msp430/arch.py
index ce0fe70f..a9f695ec 100644
--- a/miasm2/arch/msp430/arch.py
+++ b/miasm2/arch/msp430/arch.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 import logging
diff --git a/miasm2/arch/msp430/ira.py b/miasm2/arch/msp430/ira.py
index f9da81a7..2d6fdc8f 100644
--- a/miasm2/arch/msp430/ira.py
+++ b/miasm2/arch/msp430/ira.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 from miasm2.expression.expression import *
diff --git a/miasm2/arch/msp430/sem.py b/miasm2/arch/msp430/sem.py
index 92b005ad..4b52361d 100644
--- a/miasm2/arch/msp430/sem.py
+++ b/miasm2/arch/msp430/sem.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 from miasm2.expression.expression import *
diff --git a/miasm2/arch/sh4/arch.py b/miasm2/arch/sh4/arch.py
index 7c76e003..d72e6945 100644
--- a/miasm2/arch/sh4/arch.py
+++ b/miasm2/arch/sh4/arch.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 from pyparsing import *
diff --git a/miasm2/arch/x86/arch.py b/miasm2/arch/x86/arch.py
index 87e91756..90d0fcef 100644
--- a/miasm2/arch/x86/arch.py
+++ b/miasm2/arch/x86/arch.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 import re
diff --git a/miasm2/arch/x86/ira.py b/miasm2/arch/x86/ira.py
index d496f380..bc09add4 100644
--- a/miasm2/arch/x86/ira.py
+++ b/miasm2/arch/x86/ira.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 from miasm2.expression.expression import ExprAff, ExprOp, ExprId
diff --git a/miasm2/core/asmbloc.py b/miasm2/core/asmbloc.py
index 730d6d7d..b68b1f1c 100644
--- a/miasm2/core/asmbloc.py
+++ b/miasm2/core/asmbloc.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 import logging
diff --git a/miasm2/core/cpu.py b/miasm2/core/cpu.py
index 7a2968f9..22f4c8ab 100644
--- a/miasm2/core/cpu.py
+++ b/miasm2/core/cpu.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 import re
diff --git a/miasm2/core/parse_asm.py b/miasm2/core/parse_asm.py
index b324d2cc..238306b3 100644
--- a/miasm2/core/parse_asm.py
+++ b/miasm2/core/parse_asm.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 import re
 
diff --git a/miasm2/expression/__init__.py b/miasm2/expression/__init__.py
index 2bf12b34..67f567f7 100644
--- a/miasm2/expression/__init__.py
+++ b/miasm2/expression/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #
 # Copyright (C) 2011 EADS France, Fabrice Desclaux <fabrice.desclaux@eads.net>
 #
diff --git a/miasm2/expression/modint.py b/miasm2/expression/modint.py
index a801c948..90dabfac 100644
--- a/miasm2/expression/modint.py
+++ b/miasm2/expression/modint.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 class moduint(object):
diff --git a/miasm2/ir/analysis.py b/miasm2/ir/analysis.py
index 70fda11c..52fbf2e9 100644
--- a/miasm2/ir/analysis.py
+++ b/miasm2/ir/analysis.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 import logging
diff --git a/miasm2/ir/ir.py b/miasm2/ir/ir.py
index 0d4ec9fb..52230da7 100644
--- a/miasm2/ir/ir.py
+++ b/miasm2/ir/ir.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 #
diff --git a/miasm2/jitter/csts.py b/miasm2/jitter/csts.py
index 95cd34a8..8efd5626 100644
--- a/miasm2/jitter/csts.py
+++ b/miasm2/jitter/csts.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 
diff --git a/miasm2/jitter/jitcore_cc_base.py b/miasm2/jitter/jitcore_cc_base.py
index baebc294..2c2d3d52 100644
--- a/miasm2/jitter/jitcore_cc_base.py
+++ b/miasm2/jitter/jitcore_cc_base.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 import os
diff --git a/miasm2/jitter/jitcore_gcc.py b/miasm2/jitter/jitcore_gcc.py
index 0d9d5778..ccccc37a 100644
--- a/miasm2/jitter/jitcore_gcc.py
+++ b/miasm2/jitter/jitcore_gcc.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 import os
diff --git a/miasm2/jitter/jitcore_tcc.py b/miasm2/jitter/jitcore_tcc.py
index 1ab7df4d..5b47bf6d 100644
--- a/miasm2/jitter/jitcore_tcc.py
+++ b/miasm2/jitter/jitcore_tcc.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 import os
 import tempfile
diff --git a/miasm2/jitter/jitload.py b/miasm2/jitter/jitload.py
index b2416fd5..f23c78c0 100644
--- a/miasm2/jitter/jitload.py
+++ b/miasm2/jitter/jitload.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 
 import logging
 from functools import wraps
diff --git a/miasm2/os_dep/linux_stdlib.py b/miasm2/os_dep/linux_stdlib.py
index 542af25f..b05b2cd9 100644
--- a/miasm2/os_dep/linux_stdlib.py
+++ b/miasm2/os_dep/linux_stdlib.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 from sys import stdout
diff --git a/miasm2/os_dep/win_api_x86_32_seh.py b/miasm2/os_dep/win_api_x86_32_seh.py
index 3b2fdfaa..9d37c9b1 100644
--- a/miasm2/os_dep/win_api_x86_32_seh.py
+++ b/miasm2/os_dep/win_api_x86_32_seh.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 #-*- coding:utf-8 -*-
 
 #
diff --git a/test/arch/aarch64/unit/asm_test.py b/test/arch/aarch64/unit/asm_test.py
index a9e6cfc6..cfb2a81c 100644
--- a/test/arch/aarch64/unit/asm_test.py
+++ b/test/arch/aarch64/unit/asm_test.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 import sys
 import os
 
@@ -10,13 +9,6 @@ from miasm2.core import asmbloc
 from elfesteem.strpatchwork import StrPatchwork
 from miasm2.analysis.machine import Machine
 from miasm2.jitter.csts import *
-from pdb import pm
-
-
-filename = os.environ.get('PYTHONSTARTUP')
-if filename and os.path.isfile(filename):
-    execfile(filename)
-
 
 reg_and_id = dict(mn_aarch64.regs.all_regs_ids_byname)
 
diff --git a/test/arch/aarch64/unit/mn_ubfm.py b/test/arch/aarch64/unit/mn_ubfm.py
index 6f1857fb..25d1cde7 100644..100755
--- a/test/arch/aarch64/unit/mn_ubfm.py
+++ b/test/arch/aarch64/unit/mn_ubfm.py
@@ -1,4 +1,5 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
+
 import sys
 
 from asm_test import Asm_Test
diff --git a/test/arch/arm/sem.py b/test/arch/arm/sem.py
index 922642d3..3695fd29 100644..100755
--- a/test/arch/arm/sem.py
+++ b/test/arch/arm/sem.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python2
 #-*- coding:utf-8 -*-
 
 import unittest
diff --git a/test/arch/mips32/unit/asm_test.py b/test/arch/mips32/unit/asm_test.py
index 7272c15e..35d87d85 100644
--- a/test/arch/mips32/unit/asm_test.py
+++ b/test/arch/mips32/unit/asm_test.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 import sys
 import os
 
@@ -10,17 +9,10 @@ from miasm2.core import asmbloc
 from elfesteem.strpatchwork import StrPatchwork
 from miasm2.analysis.machine import Machine
 from miasm2.jitter.csts import *
-from pdb import pm
-
-
-filename = os.environ.get('PYTHONSTARTUP')
-if filename and os.path.isfile(filename):
-    execfile(filename)
 
 
 reg_and_id = dict(mn_mips32.regs.all_regs_ids_byname)
 
-
 class Asm_Test(object):
 
     def __init__(self, jitter):
diff --git a/test/arch/mips32/unit/mn_bcc.py b/test/arch/mips32/unit/mn_bcc.py
index 4818c171..e9b28e77 100644..100755
--- a/test/arch/mips32/unit/mn_bcc.py
+++ b/test/arch/mips32/unit/mn_bcc.py
@@ -1,4 +1,5 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
+
 import sys
 
 from asm_test import Asm_Test
diff --git a/test/arch/msp430/sem.py b/test/arch/msp430/sem.py
index 4d39d357..433055e0 100644..100755
--- a/test/arch/msp430/sem.py
+++ b/test/arch/msp430/sem.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python2
 #-*- coding:utf-8 -*-
 
 import unittest
diff --git a/test/arch/x86/sem.py b/test/arch/x86/sem.py
index 93d2ff83..d2198847 100644..100755
--- a/test/arch/x86/sem.py
+++ b/test/arch/x86/sem.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python2
 #-*- coding:utf-8 -*-
 
 # Loosely based on ARM's sem.py
diff --git a/test/arch/x86/unit/asm_test.py b/test/arch/x86/unit/asm_test.py
index 4e1d03b8..bf97dbe4 100644
--- a/test/arch/x86/unit/asm_test.py
+++ b/test/arch/x86/unit/asm_test.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 import sys
 import os
 
@@ -10,13 +9,6 @@ from miasm2.core import asmbloc
 from elfesteem.strpatchwork import StrPatchwork
 from miasm2.analysis.machine import Machine
 from miasm2.jitter.csts import *
-from pdb import pm
-
-
-filename = os.environ.get('PYTHONSTARTUP')
-if filename and os.path.isfile(filename):
-    execfile(filename)
-
 
 reg_and_id = dict(mn_x86.regs.all_regs_ids_byname)
 
diff --git a/test/arch/x86/unit/mn_daa.py b/test/arch/x86/unit/mn_daa.py
index d07bf849..21d609e4 100644..100755
--- a/test/arch/x86/unit/mn_daa.py
+++ b/test/arch/x86/unit/mn_daa.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
 import sys
 
 from asm_test import Asm_Test_32
diff --git a/test/arch/x86/unit/mn_das.py b/test/arch/x86/unit/mn_das.py
index 2d8102d9..08df1a7a 100644..100755
--- a/test/arch/x86/unit/mn_das.py
+++ b/test/arch/x86/unit/mn_das.py
@@ -1,4 +1,5 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
+
 import sys
 
 from asm_test import Asm_Test_32
diff --git a/test/arch/x86/unit/mn_float.py b/test/arch/x86/unit/mn_float.py
index d704de73..f31a25e3 100644..100755
--- a/test/arch/x86/unit/mn_float.py
+++ b/test/arch/x86/unit/mn_float.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
 import sys
 
 from asm_test import Asm_Test_32
diff --git a/test/arch/x86/unit/mn_int.py b/test/arch/x86/unit/mn_int.py
index 9d964220..09792371 100644..100755
--- a/test/arch/x86/unit/mn_int.py
+++ b/test/arch/x86/unit/mn_int.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
 import sys
 
 from miasm2.jitter.csts import EXCEPT_INT_XX
diff --git a/test/arch/x86/unit/mn_pcmpeq.py b/test/arch/x86/unit/mn_pcmpeq.py
index 5d0a59c6..22760db4 100644..100755
--- a/test/arch/x86/unit/mn_pcmpeq.py
+++ b/test/arch/x86/unit/mn_pcmpeq.py
@@ -1,4 +1,5 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
+
 import sys
 
 from asm_test import Asm_Test_32
diff --git a/test/arch/x86/unit/mn_pextr.py b/test/arch/x86/unit/mn_pextr.py
index 696f077b..c4548d67 100644..100755
--- a/test/arch/x86/unit/mn_pextr.py
+++ b/test/arch/x86/unit/mn_pextr.py
@@ -1,4 +1,5 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
+
 import sys
 
 from asm_test import Asm_Test_32
diff --git a/test/arch/x86/unit/mn_pinsr.py b/test/arch/x86/unit/mn_pinsr.py
index 74120e5c..4beaba13 100644..100755
--- a/test/arch/x86/unit/mn_pinsr.py
+++ b/test/arch/x86/unit/mn_pinsr.py
@@ -1,4 +1,5 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
+
 import sys
 
 from asm_test import Asm_Test_32
diff --git a/test/arch/x86/unit/mn_pmaxu.py b/test/arch/x86/unit/mn_pmaxu.py
index 527b966f..752b9132 100644..100755
--- a/test/arch/x86/unit/mn_pmaxu.py
+++ b/test/arch/x86/unit/mn_pmaxu.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
 import sys
 
 from asm_test import Asm_Test_32
diff --git a/test/arch/x86/unit/mn_pminu.py b/test/arch/x86/unit/mn_pminu.py
index d667df4e..3be95a9a 100644..100755
--- a/test/arch/x86/unit/mn_pminu.py
+++ b/test/arch/x86/unit/mn_pminu.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
 import sys
 
 from asm_test import Asm_Test_32
diff --git a/test/arch/x86/unit/mn_pmovmskb.py b/test/arch/x86/unit/mn_pmovmskb.py
index b7e7b897..a3eb65f5 100644..100755
--- a/test/arch/x86/unit/mn_pmovmskb.py
+++ b/test/arch/x86/unit/mn_pmovmskb.py
@@ -1,4 +1,5 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
+
 import sys
 
 from asm_test import Asm_Test_32
diff --git a/test/arch/x86/unit/mn_pshufb.py b/test/arch/x86/unit/mn_pshufb.py
index 5f4c7370..d10c18e3 100644..100755
--- a/test/arch/x86/unit/mn_pshufb.py
+++ b/test/arch/x86/unit/mn_pshufb.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
 import sys
 
 from asm_test import Asm_Test_32
diff --git a/test/arch/x86/unit/mn_psrl_psll.py b/test/arch/x86/unit/mn_psrl_psll.py
index 44126b96..a5428dab 100644..100755
--- a/test/arch/x86/unit/mn_psrl_psll.py
+++ b/test/arch/x86/unit/mn_psrl_psll.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
 import sys
 
 from asm_test import Asm_Test_32
diff --git a/test/arch/x86/unit/mn_punpck.py b/test/arch/x86/unit/mn_punpck.py
index f6a4772e..b519b4c3 100644..100755
--- a/test/arch/x86/unit/mn_punpck.py
+++ b/test/arch/x86/unit/mn_punpck.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
 import sys
 
 from asm_test import Asm_Test_32
diff --git a/test/arch/x86/unit/mn_pushpop.py b/test/arch/x86/unit/mn_pushpop.py
index 1a3f5517..ffcc3fa5 100644..100755
--- a/test/arch/x86/unit/mn_pushpop.py
+++ b/test/arch/x86/unit/mn_pushpop.py
@@ -1,4 +1,5 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
+
 import sys
 
 from asm_test import Asm_Test_16, Asm_Test_32
diff --git a/test/arch/x86/unit/mn_seh.py b/test/arch/x86/unit/mn_seh.py
index d6fc56ca..dd3fd4ef 100644..100755
--- a/test/arch/x86/unit/mn_seh.py
+++ b/test/arch/x86/unit/mn_seh.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
 import sys
 
 from miasm2.os_dep.win_api_x86_32_seh import fake_seh_handler, build_teb, \
diff --git a/test/arch/x86/unit/mn_stack.py b/test/arch/x86/unit/mn_stack.py
index 3bce3979..f9cfc60a 100644..100755
--- a/test/arch/x86/unit/mn_stack.py
+++ b/test/arch/x86/unit/mn_stack.py
@@ -1,4 +1,5 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
+
 import sys
 
 from asm_test import Asm_Test_32
diff --git a/test/arch/x86/unit/mn_strings.py b/test/arch/x86/unit/mn_strings.py
index 5e7269f7..3cb70e2a 100644..100755
--- a/test/arch/x86/unit/mn_strings.py
+++ b/test/arch/x86/unit/mn_strings.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2
 import sys
 
 from asm_test import Asm_Test_32
diff --git a/test/core/interval.py b/test/core/interval.py
index 4572ac50..ab18e567 100644..100755
--- a/test/core/interval.py
+++ b/test/core/interval.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python2
 #-*- coding:utf-8 -*-
 
 from miasm2.core.interval import *
diff --git a/test/core/parse_asm.py b/test/core/parse_asm.py
index a488d075..e91c8c8c 100644..100755
--- a/test/core/parse_asm.py
+++ b/test/core/parse_asm.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python2
 #-*- coding:utf-8 -*-
 
 import unittest
diff --git a/test/core/test_types.py b/test/core/test_types.py
index f6e5cb13..ab1d47c4 100644..100755
--- a/test/core/test_types.py
+++ b/test/core/test_types.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python2
 
 # miasm2.core.types tests
 
diff --git a/test/core/utils.py b/test/core/utils.py
index f7de6565..b506f904 100644..100755
--- a/test/core/utils.py
+++ b/test/core/utils.py
@@ -1,4 +1,5 @@
-#!/usr/bin/env python
+#! /usr/bin/env python2
+
 #-*- coding:utf-8 -*-
 
 import unittest
diff --git a/test/expression/expression_helper.py b/test/expression/expression_helper.py
index a3a8fba4..6c800020 100644..100755
--- a/test/expression/expression_helper.py
+++ b/test/expression/expression_helper.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python2
 #-*- coding:utf-8 -*-
 
 import unittest
diff --git a/test/expression/stp.py b/test/expression/stp.py
index fe09e865..b911a2a4 100644..100755
--- a/test/expression/stp.py
+++ b/test/expression/stp.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python2
 #-*- coding:utf-8 -*-
 
 import unittest
diff --git a/test/ir/analysis.py b/test/ir/analysis.py
index 913d9c56..913d9c56 100755..100644
--- a/test/ir/analysis.py
+++ b/test/ir/analysis.py
diff --git a/test/ir/ir2C.py b/test/ir/ir2C.py
index 36683904..395703ed 100644..100755
--- a/test/ir/ir2C.py
+++ b/test/ir/ir2C.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python2
 #-*- coding:utf-8 -*-
 
 import unittest
diff --git a/test/ir/symbexec.py b/test/ir/symbexec.py
index 24b02341..2e776f74 100644..100755
--- a/test/ir/symbexec.py
+++ b/test/ir/symbexec.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python2
 #-*- coding:utf-8 -*-
 
 import unittest
diff --git a/test/os_dep/win_api_x86_32.py b/test/os_dep/win_api_x86_32.py
index bb13138f..2e22ccea 100644..100755
--- a/test/os_dep/win_api_x86_32.py
+++ b/test/os_dep/win_api_x86_32.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python2
 #-*- coding:utf-8 -*-
 
 import unittest
diff --git a/test/test_all.py b/test/test_all.py
index 68830b48..bec0c78d 100644..100755
--- a/test/test_all.py
+++ b/test/test_all.py
@@ -1,3 +1,5 @@
+#! /usr/bin/env python2
+
 import argparse
 import time
 import os