python-3.xwindows-10sl4a

Windows equivalent of sl4a


I'm teaching myself Python and have been experimenting with sl4a to interact with Android features like GPS and text to speech with codes like

import androidhelper

droid = androidhelper.Android()

location = droid.getLastKnownLocation().result

location = location.get('network', location.get('gps'))

and

import sl4a

droid = sl4a.Android()
droid.ttsSpeak("Hello World.")

I've been searching for a similar Python API module to access Windows 10 features on a PC but it seems to be much more complex.

Is there a relatively simply way to accomplish what I'm trying to do?


Solution

  • As far as TTS is concerned, use gTTS.

    For geolocation, use any of the tons of RESTful APIs like FreeGeoIP. Next parse the JSON returned and you're good to go!