changeset 77:998f2076d0bb

Merge from head
author Thinker K.F. Li <thinker@codemud.net>
date Tue, 19 Jul 2011 12:41:09 +0800
parents 475431ba4cb8 (current diff) 9422a25e798d (diff)
children 9a64fa2d78b7
files
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/paraspace/dexfile.py	Tue Jul 19 12:40:30 2011 +0800
+++ b/paraspace/dexfile.py	Tue Jul 19 12:41:09 2011 +0800
@@ -1649,7 +1649,15 @@
 
 
 if __name__ == '__main__':
-    dex = DEXFile.open('data/testdata1.dex')
+    import sys
+    
+    if len(sys.argv) != 2:
+        print >> sys.stderr, 'Usage: %s <dex file>' % (sys.argv[0])
+        sys.exit(1)
+        pass
+    
+    dex_fname = sys.argv[1]
+    dex = DEXFile.open(dex_fname)
     
     print 'Header'
     h = dex.header