Diskussion:GeoLocation

Wechseln zu: Navigation, Suche

Kleine Anmerkung zu den Python Strings. Statt <highlightSyntax language="python">print print "Information about " + givenMac print print "Accuracy: " + str(responseJson["location"]["accuracy"]) + "m" print "Latitude: " + str(responseJson["location"]["latitude"]) print "Longitude: " + str(responseJson["location"]["longitude"]) print print "Approximate address:"</highlightSyntax> kannst auch den """-String nehmen: <highlightSyntax language="python">print """ Information about %{givenMac}s

Accuracy: %{accuracy}dm Latitude: ....""" % \ {givenMac:"blabla", accuracy:str(responseJson["location"]["accuracy"]), ...} </highlightSyntax> Mehr Infos dazu gibt's in der [Python Doku] --Whiskey 08:44, 17. Jan. 2011 (UTC)

Danke, habe es angepasst. --Basti 20:56, 17. Jan. 2011 (UTC)