0

so i have this script that i pulled from a website, and am trying to get a barcode scanner working... the site says it can be done in these 6 lines of python:

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)

and i am getting a syntax error a the first '?' in the url. can anyone help me figure this out? i have no experience in python or the android api.

1 Answer 1

1

Change all the ? to " might work. I guess when you copy from the website, something funny happens.

Sign up to request clarification or add additional context in comments.

1 Comment

that was it, wow i should have been able to figure that one out... lol thanks for the quick response

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.