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


Groups > comp.lang.python > #62627 > unrolled thread

Re: Airplane mode control using Python?

Started byNed Batchelder <ned@nedbatchelder.com>
First post2013-12-23 08:35 -0500
Last post2013-12-23 08:35 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Airplane mode control using Python? Ned Batchelder <ned@nedbatchelder.com> - 2013-12-23 08:35 -0500

#62627 — Re: Airplane mode control using Python?

FromNed Batchelder <ned@nedbatchelder.com>
Date2013-12-23 08:35 -0500
SubjectRe: Airplane mode control using Python?
Message-ID<mailman.4556.1387805714.18130.python-list@python.org>
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 "<stdin>", line 1, in <module>
> 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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web