diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2018-03-04 18:08:04 -0500 |
|---|---|---|
| committer | Ryan Snyder <ryan@vector35.com> | 2018-07-10 18:11:08 -0400 |
| commit | 8849fb2b2b8dc824bd3f17ce1026a04856477a94 (patch) | |
| tree | e85f3db97d6d6b5fa2a21162c684fd08d47e4ab0 /python/platform.py | |
| parent | 8028bd325bc94a385f99122d87ac906ba717ecbf (diff) | |
working division, prints, and metaclasses, but imports broken, still needs work
Diffstat (limited to 'python/platform.py')
| -rw-r--r-- | python/platform.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/python/platform.py b/python/platform.py index dd756178..ff59be50 100644 --- a/python/platform.py +++ b/python/platform.py @@ -20,15 +20,16 @@ import ctypes -# Binary Ninja components -import _binaryninjacore as core -import startup -import architecture -import callingconvention -import types +# Binary Ninja components -- additional imports belong in the appropriate class +from binaryninja import _binaryninjacore as core + +#2-3 compatibility +from six import with_metaclass class _PlatformMetaClass(type): + from binaryninja import startup + from binaryninja import types @property def list(self): startup._init_plugins() @@ -90,12 +91,14 @@ class _PlatformMetaClass(type): return result -class Platform(object): +class Platform(with_metaclass(_PlatformMetaClass, object)): """ ``class Platform`` contains all information releated to the execution environment of the binary, mainly the calling conventions used. """ - __metaclass__ = _PlatformMetaClass + from binaryninja import architecture + from binaryninja import callingconvention + from binaryninja import types name = None def __init__(self, arch, handle = None): |
