Tuesday, November 29, 2011

Your cup of Python on Android

Here’s a barcode scanner written in six lines of Python code:

import android
droid = android.Android()
code = droid.scanBarcode()
isbn = int(code['result']['SCAN_RESULT'])
url = “http://books.google.com?q=%d” % isbn
droid.startActivity(‘android.intent.action.VIEW’, url)



SOURCE- http://www.mattcutts.com/blog/android-barcode-scanner/

No comments:

Post a Comment