All,
Just to let you know that extensive testing has discovered a bug in the
worldclock sample.
Specifically the javascript I converted to a python module is
calculating an incorrect value for the URL to update the image from.
I'm investigating the bug and hope to have a correction soon. In the
meantime if you want to get the 'correct' image I suggest you switch
back to using the javascript function to calculate the URL. To
accomplish this change just uncomment lines 76 to 83 of worldclock.py
and comment out line 84. This section of the file should change from;
"""
# try:
# jScript = "cscript //nologo xearth.js"
# file = os.popen(jScript)
# s = file.read()
# url = "http://www.time.gov/" + s
# except:
# url = "http://www.time.gov/images/xearths/night.jpg"
# #url = "http://www.time.gov/images/xearths/11N/100N.jpg"
url = "http://www.time.gov/" + xearth.getLatLong()
"""
to
"""
try:
jScript = "cscript //nologo xearth.js"
file = os.popen(jScript)
s = file.read()
url = "http://www.time.gov/" + s
except:
url = "http://www.time.gov/images/xearths/night.jpg"
#url = "http://www.time.gov/images/xearths/11N/100N.jpg"
# url = "http://www.time.gov/" + xearth.getLatLong()
"""
Any questions, please shout.
Regards,
Andy
--
-----------------------------------------------------------------------
From the desk of Andrew J Todd esq.
"Hit me with your fax machine, baby" - Francis Dunnery, "Because I Can"
|