summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/examples/arm-syscall.py5
-rw-r--r--python/examples/bin-info.py5
-rw-r--r--python/examples/instruction-iterator.py5
3 files changed, 3 insertions, 12 deletions
diff --git a/python/examples/arm-syscall.py b/python/examples/arm-syscall.py
index cbd8f4bf..f94b8531 100644
--- a/python/examples/arm-syscall.py
+++ b/python/examples/arm-syscall.py
@@ -10,10 +10,7 @@ else:
raise ValueError("Missing argument to binary.")
bv = binaryninja.BinaryViewType["Mach-O"].open(target)
-bv.update_analysis()
-
-"""Until update_analysis_and_wait is complete, sleep is necessary as the analysis is multi-threaded."""
-time.sleep(5)
+bv.update_analysis_and_wait()
for func in bv.functions:
for il in func.low_level_il:
diff --git a/python/examples/bin-info.py b/python/examples/bin-info.py
index 6ec00bce..48073894 100644
--- a/python/examples/bin-info.py
+++ b/python/examples/bin-info.py
@@ -13,10 +13,7 @@ else:
target = "/bin/ls"
bv = binaryninja.BinaryViewType[bintype].open(target)
-bv.update_analysis()
-
-"""Until update_analysis_and_wait is complete, sleep is necessary as the analysis is multi-threaded."""
-time.sleep(1)
+bv.update_analysis_and_wait()
print "-------- %s --------" % target
print "START: 0x%x" % bv.start
diff --git a/python/examples/instruction-iterator.py b/python/examples/instruction-iterator.py
index 7b03b095..43bc000e 100644
--- a/python/examples/instruction-iterator.py
+++ b/python/examples/instruction-iterator.py
@@ -21,10 +21,7 @@ else:
target = "/bin/ls"
bv = binaryninja.BinaryViewType[bintype].open(target)
-bv.update_analysis()
-
-"""Until update_analysis_and_wait is complete, sleep is necessary as the analysis is multi-threaded."""
-time.sleep(1)
+bv.update_analysis_and_wait()
print "-------- %s --------" % target
print "START: 0x%x" % bv.start