Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'from:addr:yahoo.co.uk': 0.04; 'syntax': 0.04; 'subject:Python': 0.06; '*not*': 0.07; 'attribute': 0.07; "'no": 0.09; 'badly': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:using': 0.09; 'suggestions.': 0.09; 'python': 0.11; 'language.': 0.14; 'changes': 0.15; 'posted': 0.15; '23,': 0.16; 'chris,': 0.16; 'fine.': 0.16; 'merged': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'stupid,': 0.16; 'subscribing': 0.16; 'typo': 0.16; 'whitespace.': 0.16; 'language': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'trying': 0.19; 'else,': 0.19; 'things.': 0.19; '>>>': 0.22; 'import': 0.22; 'header:User- Agent:1': 0.23; 'error': 0.23; 'url:moin': 0.24; 'mon,': 0.24; 'source': 0.25; 'post': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'dec': 0.30; 'errors': 0.30; 'kevin': 0.30; 'mode': 0.30; 'went': 0.31; 'code': 0.31; 'lines': 0.31; 'posting': 0.31; 'url:wiki': 0.31; 'factor': 0.31; 'fine,': 0.31; 'formed': 0.31; 'peterson': 0.31; 'url:python': 0.33; 'running': 0.33; 'skip:# 10': 0.33; 'skip:d 20': 0.34; 'problem': 0.35; 'except': 0.35; 'something': 0.35; 'but': 0.35; 'google': 0.35; 'there': 0.35; 'subject:?': 0.36; 'url:org': 0.36; 'too': 0.37; 'list': 0.37; 'to:addr:python-list': 0.38; 'list,': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'mailing': 0.39; 'received:org': 0.40; 'easy': 0.60; 'such': 0.63; 'email addr:yahoo.com': 0.64; 'our': 0.64; 'here': 0.66; 'continuous': 0.68; 'groups.': 0.74; 'messed': 0.84; 'received:2': 0.84; 'undoubtedly': 0.84; 'amongst': 0.91; 'clique': 0.91; 'info,': 0.91; 'widespread': 0.91; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Airplane mode control using Python? Date: Mon, 23 Dec 2013 06:34:57 +0000 References: <5a15bd65-8183-48be-8ac2-be0666fed75d@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-2-98-192-63.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <5a15bd65-8183-48be-8ac2-be0666fed75d@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 53 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1387780512 news.xs4all.nl 2935 [2001:888:2000:d::a6]:54287 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:62599 On 23/12/2013 04:52, rurpy@yahoo.com wrote: > On 12/22/2013 08:33 PM, Chris Angelico wrote: >> On Mon, Dec 23, 2013 at 2:20 PM, Kevin Peterson 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