From f38e0c175406381e9018efcc658641359a014e7e Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Mon, 23 May 2022 17:12:57 -0400 Subject: update binaryview class example documentation --- python/binaryview.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'python/binaryview.py') diff --git a/python/binaryview.py b/python/binaryview.py index 405afcc6..6b9e818c 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -1702,26 +1702,26 @@ class BinaryView: >>> BinaryViewType['ELF'] - To open a file with a given BinaryView the following code can be used:: + To open a file with a given BinaryView the following code is recommended: - >>> bv = BinaryViewType.get_view_of_file("/bin/ls") - >>> bv - + >>> with open_view("/bin/ls") as bv: + ... bv + - `By convention in the rest of this document we will use bv to mean an open BinaryView of an executable file.` - When a BinaryView is open on an executable view, analysis does not automatically run, this can be done by running - the :func:`update_analysis_and_wait` method which disassembles the executable and returns when all disassembly is - finished:: + `By convention in the rest of this document we will use bv to mean an open and, analyzed, BinaryView of an executable file.` + When a BinaryView is open on an executable view analysis is automatically run unless specific named parameters are used + to disable updates. If such a parameter is used, updates can be triggered using the :func:`update_analysis_and_wait` method + which disassembles the executable and returns when all disassembly and analysis is complete:: >>> bv.update_analysis_and_wait() >>> - Since BinaryNinja's analysis is multi-threaded (depending on version) this can also be done in the background by - using the :func:`update_analysis` method instead. + Since BinaryNinja's analysis is multi-threaded (depending on version) this can also be done in the background + by using the :func:`update_analysis` method instead. - By standard python convention methods which start with '_' should be considered private and should not be called - externally. Additionally, methods which begin with ``perform_`` should not be called either and are - used explicitly for subclassing the BinaryView. + By standard python convention methods which start with '_' should be considered private and should not + be called externally. Additionally, methods which begin with ``perform_`` should not be called directly + either and are used explicitly for subclassing a BinaryView. .. note:: An important note on the ``*_user_*()`` methods. Binary Ninja makes a distinction between edits \ performed by the user and actions performed by auto analysis. Auto analysis actions that can quickly be recalculated \ -- cgit v1.3.1