Last active
April 19, 2018 21:37
-
-
Save tym-xqo/cda4f5d76d32cd47c0d2482737d99d7e to your computer and use it in GitHub Desktop.
Simple script to get lat & long from Location Services on MacOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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