diff python/ppci/__init__.py @ 383:173e20a47fda

Added linker description loader
author Windel Bouwman
date Sun, 27 Apr 2014 17:40:39 +0200
parents d1ecc493384e
children
line wrap: on
line diff
--- a/python/ppci/__init__.py	Sun Apr 27 12:24:21 2014 +0200
+++ b/python/ppci/__init__.py	Sun Apr 27 17:40:39 2014 +0200
@@ -17,3 +17,11 @@
 
 def same_dir(full_path, filename):
     return os.path.join(os.path.dirname(os.path.abspath(full_path)), filename)
+
+
+def make_num(txt):
+    if txt.startswith('0x'):
+        return int(txt[2:], 16)
+    else:
+        return int(txt)
+