Airplane mode control using Python?
Kevin Peterson
qh.resu01 at gmail.com
Mon Dec 23 00:38:50 EST 2013
I will take care.
Thanks,
On Mon, Dec 23, 2013 at 10:22 AM, <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.
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20131223/c97a306b/attachment.html>
More information about the Python-list
mailing list