Airplane mode control using Python?

Michael Torrie torriem at gmail.com
Sun Dec 22 22:41:09 EST 2013


On 12/22/2013 08:20 PM, Kevin Peterson wrote:
> Hi, 
> 
> I am trying to control Aeroplane mode on Android using Python code.
> I am running QPyPlus python. When I execute this code(that is widespread
> in the net),
> 
>     #!/usr/bin/python 
>     import android droid = android.Android()
>     # go to airplane mode
>      droid.toggleAirplaneMode()
>      
>     droid.makeToast('exiting')
> 
> I get the error 'no such attribute Android()'. 

Is that really how your code is formatted? The import line is an error.

try:

import android


droid = android.Android()




More information about the Python-list mailing list