-
Notifications
You must be signed in to change notification settings - Fork 0
/
weather.py
executable file
·34 lines (26 loc) · 1.06 KB
/
weather.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/python
import sys
argList = sys.argv
city = argList[1]
state = argList[2]
# locations with no straight up changes
fixes = {"Ann_Arbor_Charter_Township" : "Ann_Arbor",
"Christiansbrg" : "Christiansburg",
"Hampshire" : "Northampton",
"Harlem" : "Manhattan",
"Lansingburgh" : "Albany",
"Mid-Cambridge" : "Cambridge",
"Philly" : "Philadelphia",
"Princeton_Jct" : "Princeton_Junction",
"Riverdale_Park" : "Riverdale",
"Southern_California" : "Los_Angeles",
"St._Jacobs" : "Kitchener",
"St_Jacobs" : "Kitchener",
"Victoria_Park" : "Kitchener",
"Waterloo" : "Kitchener",
"Westwood_Village" : "Westwood"}
if city in fixes:
city = fixes[city]
# path for weather uses underscores
city = city.replace(" ", "_")
print state + "/" + city