Skip to content

Instantly share code, notes, and snippets.

@tym-xqo
Last active April 19, 2018 21:37
Show Gist options
  • Save tym-xqo/cda4f5d76d32cd47c0d2482737d99d7e to your computer and use it in GitHub Desktop.
Save tym-xqo/cda4f5d76d32cd47c0d2482737d99d7e to your computer and use it in GitHub Desktop.
Simple script to get lat & long from Location Services on MacOS
# pip install pyobjc
import CoreLocation
def main():
location_mgr = CoreLocation.CLLocationManager.alloc().init()
location_mgr.startUpdatingLocation()
here = location_mgr.location()
print(list(here.coordinate()))
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment