Python crap

[email protected]
Newsgroups alt.alt
Message-ID <[email protected]>
# GPS raw v.2 ---^

import android
import sys, select, os
zooz = android.Android()

zooz.eventClearBuffer()
zooz.startLocating()
ziz = zooz.eventWaitFor('location',10000).result
lat = repr(ziz['data']['gps']['latitude'])
lng = repr(ziz['data']['gps']['longitude'])
sea = repr(ziz['data']['gps']['altitude'])
acu = repr(ziz['data']['gps']['accuracy'])
spd = repr(ziz['data']['gps']['speed'])
adr = zooz.geocode(lat, lng).result
# weird = zooz.geocode(lng, lat).result

if ziz['name'] == "location":
 try:
  eah = "1"
 except KeyError:
  eah = "0"

zubs = "[E:" + eah + "]"

# zooz.stopLocating()
# zooz.startLocating()
# Trying supposedly valid keywords 'network' and 'passive' gets all fucky
# nwlat = repr(ziz['data']['passive']['latitude'])
# nwlng = repr(ziz['data']['passive']['longitude'])
zooz.stopLocating()
gpstype = "#"
print (zubs + "[GPS]==========")
place = "LT:"+ lat + "-" + gpstype
print (place)
place = "LG:"+ lng + "-" + gpstype
print (place)
# -----misc
# BAD int seal

# convert to float for math then convert back
sealt = float(sea)
seal = sealt * 3.2808333 
seal = str(seal)


speed = spd
accu = acu
misk = "SEA(ft/mtr):" + seal + "/" + sea + "#SPEED:" + speed + "#ACCU:" + accu + "_end"
print (misk)



# ----- GET TIME
import androidhelper
import time
stime = time.strftime("%I:%M'%S [%A] %B/%e/%Y")
# %I - hour %M - minute %S - second ~{aptime.man}~
# %A - day %B - month %e - day %Y - year ~{aptime.man}~


# ----- GET STREET ADDRESS
adr = str(adr)
# weird = str(weird)
print ("------------" + stime)
print ("ADR:" + adr)
# print ("Weird:" + weird)

# ==== SPEAK
zerq = androidhelper.Android()
zerq.ttsSpeak("lattitude" + lat + "longitude" + lng)

# print ("[CELLTOWER]====")
# place = "nLT:"+ nwlat + "-" + gpstype
# print (place)
# place = "nLG:"+ nwlng + "-" + gpstype
# print (place)

# 36 in + 3.37 is 3 feet 3.37 inches 39.37

# ------RIGHT
# sea * 3.2808333

#  ----- WRONG
# sea1 = sea * 3
# sea2 = sea * 3.37
# sea3 = sea1 + sea2
# 2.780
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.