about summary refs log tree commit diff stats
path: root/example/expression/expr_grapher.py
diff options
context:
space:
mode:
Diffstat (limited to 'example/expression/expr_grapher.py')
-rw-r--r--example/expression/expr_grapher.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/example/expression/expr_grapher.py b/example/expression/expr_grapher.py
index e0562852..e1643b03 100644
--- a/example/expression/expr_grapher.py
+++ b/example/expression/expr_grapher.py
@@ -1,6 +1,8 @@
+from __future__ import print_function
+
 from miasm2.expression.expression import *
 
-print "Simple Expression grapher demo"
+print("Simple Expression grapher demo")
 
 a = ExprId("A", 32)
 b = ExprId("B", 32)
@@ -8,13 +10,13 @@ c = ExprId("C", 32)
 d = ExprId("D", 32)
 m = ExprMem(a + b + c + a, 32)
 
-e1 = ExprCompose(a + b - (c * a) / m | b, a + m)
+e1 = ExprCompose(a + b - ((c * a) // m) | b, a + m)
 e2 = ExprInt(15, 64)
 e = ExprCond(d, e1, e2)[0:32]
 
-print "[+] Expression:"
-print e
+print("[+] Expression:")
+print(e)
 
 g = e.graph()
-print "[+] Graph:"
-print g.dot()
+print("[+] Graph:")
+print(g.dot())