Changelog: bv.write and bv.insert require a bytes object in python3 Architecture.assemble outputs a bytes object in python3, a str in python2 Architecture.assemble will throw a value error if it cannot assemble the given instruction API install script should be run in the version of python you want it installed in Fundamental python changes to be aware of: Unicode-type strings are now just str, consequently anything that came out as a unicode string before (annotations) are now just str. Longs no longer exist. They're just ints.
Diffstat (limited to 'python/log.py')
-rw-r--r--python/log.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/python/log.py b/python/log.py
index b1fd7095..9a5e1358 100644
--- a/python/log.py
+++ b/python/log.py
@@ -20,8 +20,8 @@
# Binary Ninja components
-import _binaryninjacore as core
-from enums import LogLevel
+from binaryninja import _binaryninjacore as core
+from binaryninja.enums import LogLevel
_output_to_log = False
@@ -55,7 +55,7 @@ def log(level, text):
:param str text: message to print
:rtype: None
"""
- core.BNLog(level, "%s", str(text))
+ core.BNLog(level,text)
def log_debug(text):
@@ -70,7 +70,7 @@ def log_debug(text):
>>> log_debug("Hotdogs!")
Hotdogs!
"""
- core.BNLogDebug("%s", str(text))
+ core.BNLogDebug(text)
def log_info(text):
@@ -85,7 +85,7 @@ def log_info(text):
Saucisson!
>>>
"""
- core.BNLogInfo("%s", str(text))
+ core.BNLogInfo(text)
def log_warn(text):
@@ -101,7 +101,7 @@ def log_warn(text):
Chilidogs!
>>>
"""
- core.BNLogWarn("%s", str(text))
+ core.BNLogWarn(text)
def log_error(text):
@@ -117,7 +117,7 @@ def log_error(text):
Spanferkel!
>>>
"""
- core.BNLogError("%s", str(text))
+ core.BNLogError(text)
def log_alert(text):
@@ -133,7 +133,7 @@ def log_alert(text):
Kielbasa!
>>>
"""
- core.BNLogAlert("%s", str(text))
+ core.BNLogAlert(text)
def log_to_stdout(min_level=LogLevel.InfoLog):