Reputation: 629
I'm coming up just a little short on this. I know google has a python client library, and it also has Client Location. However, i'm at a loss on how to access Client Location via the API. What I'm trying to do is make a desktop app Location Aware.
Upvotes: 1
Views: 1681
Reputation: 11662
Is it a desktop app running in a browser ? If so, then use the W3C GeoLocation API - see https://stackoverflow.com/a/8973377/156477 and many other questions on SO.
If not, then you need a service that determines location via WiFi MAC address or an IP geolocation lookup. For the WiFi MAC address lookup, check out http://code.google.com/p/maclocate/. For an IP based lookup, MaxMind provide a service (there is a free service accurate to a city, or a paid for service if you need more accuracy). There is also a Python library http://www.maxmind.com/app/python.
Note, I haven't tried either library so I can't vouch for them. I have used the MaxMind service and it works well, with the exception of users who are on a corporate network. These users will always be reported as being located where the corporate network hub is.
Upvotes: 2