summaryrefslogtreecommitdiff
path: root/docs/dev/batch.md
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2021-06-07 09:59:54 -0400
committerPeter LaFosse <peter@vector35.com>2021-09-05 10:08:09 -0400
commit61b4bb24e06aa955484293d35fa926c07887544b (patch)
tree29c6b7fecdac6270681260637439926ec07a259e /docs/dev/batch.md
parent75f2463a46cc666e87120f3a30332fa80020b62e (diff)
Add type hints to basicblock.py, lowlevelil.py, architecture.py
Diffstat (limited to 'docs/dev/batch.md')
-rw-r--r--docs/dev/batch.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/dev/batch.md b/docs/dev/batch.md
index dd955bf8..044be8ac 100644
--- a/docs/dev/batch.md
+++ b/docs/dev/batch.md
@@ -22,7 +22,7 @@ Let's try a simple example script (note that this script will work identically o
#!/usr/bin/env python3
import binaryninja
with binaryninja.open_view("/bin/ls") as bv:
- print(f"Opening {bv.file.filename} which has {len(bv.functions)} functions")
+ print(f"Opening {bv.file.filename} which has {len(list(bv.functions))} functions")
```
If we run it, we'll see:
@@ -48,7 +48,7 @@ from binaryninja import open_view
from glob import glob
for bin in glob("/bin/*"):
with open_view(bin, update_analysis=False) as bv:
- print(f"Opening {bv.file.filename} which has {len(bv.functions)} functions")
+ print(f"Opening {bv.file.filename} which has {len(list(bv.functions))} functions")
```
Now let's run it and notice it's fast enough to parse all of `/bin/*` in just a few seconds:
@@ -97,7 +97,7 @@ from multiprocessing import Pool, cpu_count, set_start_method
def spawn(filename):
binaryninja.set_worker_thread_count(1)
with binaryninja.open_view(filename, update_analysis=False) as bv:
- print(f"Binary {bv.file.filename} has {len(bv.functions)} functions.")
+ print(f"Binary {bv.file.filename} has {len(list(bv.functions))} functions.")
if __name__ == '__main__':
set_start_method("spawn")