summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/__init__.py16
1 files changed, 3 insertions, 13 deletions
diff --git a/python/__init__.py b/python/__init__.py
index 82f591db..498b3e4f 100644
--- a/python/__init__.py
+++ b/python/__init__.py
@@ -256,9 +256,9 @@ def get_memory_usage_info():
return result
-class open_view(object):
+def open_view(*args, **kwargs):
"""
- Context Manager for BinaryView objects
+ Open a BinaryView object
:Example:
>>> from binaryninja import *
@@ -268,14 +268,4 @@ class open_view(object):
128
"""
- def __init__(self, *args, **kwargs):
- self.args = args
- self.kwargs = kwargs
-
- def __enter__(self):
- self.view = BinaryViewType.get_view_of_file(*self.args, **self.kwargs)
- return self.view
-
- def __exit__(self, type, value, traceback):
- if self.view is not None:
- self.view.file.close() \ No newline at end of file
+ return BinaryViewType.get_view_of_file_with_options(*args, **kwargs) \ No newline at end of file