Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.06; 'attribute': 0.07; 'imported': 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; 'python': 0.11; '2.7.2': 0.16; '7:45': 0.16; '__version__': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'thanks,': 0.17; 'wrote:': 0.18; 'module': 0.19; '>>>': 0.22; 'import': 0.22; 'print': 0.22; 'header:User-Agent:1': 0.23; 'directory.': 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; 'kevin': 0.30; '"",': 0.31; 'peterson': 0.31; 'file': 0.32; '(most': 0.33; 'there': 0.35; 'subject:?': 0.36; 'version,': 0.38; 'to:addr:python-list': 0.38; 'files': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'is.': 0.60; 'show': 0.63; 'more': 0.64; 'here': 0.66; 'jul': 0.74; 'snapshot': 0.84; '2013,': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ned Batchelder Subject: Re: Airplane mode control using Python? Date: Mon, 23 Dec 2013 08:35:03 -0500 References: <52B7B0D5.4060804@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 18.189.30.229 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: 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: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1387805714 news.xs4all.nl 2963 [2001:888:2000:d::a6]:47665 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:62627 On 12/23/13 7:45 AM, Kevin Peterson wrote: > Hi Ned, > > I havenot named it as android.py and there are no .pyc files in my > directory. > > Here is the snapshot > $ python > Python 2.7.2 (default, Jul 20 2013, 22:54:57) > [GCC 4.4.3] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import android > >>> droid = android.Android() > Traceback (most recent call last): > File "", line 1, in > AttributeError: 'module' object has no attribute 'Android' > >>> > > Thanks, Hmm, then perhaps your android module is not the one you think it is. Try this to see what you get: >>> import android >>> print android .. this will show where it's imported from .. >>> dir(android) .. this will show the names available in the android module .. .. if any of them look like __version__ or VERSION, print that >>> android.__version__ -- Ned Batchelder, http://nedbatchelder.com