Airplane mode control using Python?

Mark Lawrence breamoreboy at yahoo.co.uk
Mon Dec 23 07:34:57 CET 2013


On 23/12/2013 04:52, rurpy at yahoo.com wrote:
> On 12/22/2013 08:33 PM, Chris Angelico wrote:
>> On Mon, Dec 23, 2013 at 2:20 PM, Kevin Peterson <qh.resu01 at gmail.com> wrote:
>>> 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()'.
>>
>> Python code is sensitive to changes in whitespace. The above is
>> actually a syntax error, because lines have been merged and indented
>> incorrectly. You seem to be posting from Google Groups, which may be
>> why it's messed up; I recommend switching to something else, like
>> Mozilla Thunderbird, or subscribing instead to the mailing list
>> (with all the same content)
>
> My electricity went out right around the time the OP posted
> from Google Groups, that too was undoubtedly GG's fault.
>
> Come on Chris, it is just as easy to make typo or copy-and-
> paste errors in any other software as GG, there is no evidence
> that it was GG's fault.
>
> If you want to recommend the mailing list, fine, but please
> don't make stupid, unfounded, accusatory suggestions.
>
> Kevin: just for your own info, there are a few people here
> who despise Google Groups.  I and many other people post
> from Google Groups regularly and it works fine.  You might
> want to take a look at
>   https://wiki.python.org/moin/GoogleGroupsPython
> for some ways to reduce the annoyance factor for the anti-GG
> clique here.
>

We are *NOT* anti-GG, we've anti-reading double spaced crap, continuous 
single lines instead of proper paragraphs and badly formed Python source 
code amongst other things.  We *DON'T* as a rule of thumb get this 
problem from any source except GG.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list