0

I am trying to execute "import android" command on the python shell. It gives error like this :

>>> **import android** 
 Traceback (most recent call last): 
File "<pyshell#11>", line 1, in <module> 
 import android 
File ".\android.py", line 51 
 print result['error'] 
 ^

I'm having python 3.3.2 installed on the PC (windows 7) and have android.py (SL4A) available in the python directory on my system and the system path also contains python.

Plz help in resolving this error.

Daniel Roseman
602k68 gold badges911 silver badges924 bronze badges
asked Nov 5, 2013 at 10:10

1 Answer 1

1

Print changed from a statement to a function on Python 3. And the module(android) you're trying to import is written for Python 2.

You should either use a Python 2 interpreter, or find(or make) that module compatible with Python 3.

answered Nov 5, 2013 at 10:13
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.