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.

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.

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

Comments

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.