Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #62586

Re: Airplane mode control using Python?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <torriem+gmail@torriefamily.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'subject:Python': 0.06; 'attribute': 0.07; "'no": 0.09; 'subject:using': 0.09; 'try:': 0.09; 'python': 0.11; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'trying': 0.19; 'import': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'header:In-Reply- To:1': 0.27; 'kevin': 0.30; 'mode': 0.30; 'code': 0.31; 'peterson': 0.31; 'running': 0.33; 'skip:# 10': 0.33; 'skip:d 20': 0.34; 'really': 0.36; 'subject:?': 0.36; 'hi,': 0.36; 'error.': 0.37; 'message-id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'such': 0.63; 'widespread': 0.91
X-Virus-Scanned amavisd-new at torriefamily.org
Date Sun, 22 Dec 2013 20:41:09 -0700
From Michael Torrie <torriem@gmail.com>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20130105 Thunderbird/10.0.12
MIME-Version 1.0
To python-list@python.org
Subject Re: Airplane mode control using Python?
References <abcd1234abc123ab12a0000025741000010000001052@gmail.com>
In-Reply-To <abcd1234abc123ab12a0000025741000010000001052@gmail.com>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4528.1387770099.18130.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1387770099 news.xs4all.nl 2830 [2001:888:2000:d::a6]:44995
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:62586

Show key headers only | View raw


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()

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Airplane mode control using Python? Michael Torrie <torriem@gmail.com> - 2013-12-22 20:41 -0700

csiph-web