Last active
June 23, 2024 00:01
-
-
Save pythoninthegrass/00796ffc20647762c11cc164ff6fb5c5 to your computer and use it in GitHub Desktop.
geopy test file
This file contains 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
#!/usr/bin/env python | |
import os | |
from geopy.geocoders import Nominatim | |
from pprint import pprint | |
app = Nominatim(user_agent="tutorial") | |
if len(os.sys.argv) > 1: | |
your_loc = os.sys.argv[1] | |
else: | |
your_loc = input("Enter your location: ") | |
location = app.geocode(your_loc) | |
pprint(location) |
Author
pythoninthegrass
commented
Jun 22, 2024
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment