Skip to content
Prev Previous commit
Next Next commit
updated weather_report.py
  • Loading branch information
vaikunth-coder27 committed Jun 13, 2021
commit 0b2e13f8583b74b524a329917c7550ce9d9ecdbb
6 changes: 0 additions & 6 deletions GUIScripts/Weather Report GUI/weather_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ def ipinfo():
client = IpregistryClient(api_key_ipregistry)
ipInfo = client.lookup()
x=ipInfo.location
#print(x)
#print(x['city']+","+x['region']['name']+","+x['country']['name'])
latitude=x['latitude']
longitude = x['longitude']
location=x['city']+","+x['region']['name']+","+x['country']['name']
Expand Down Expand Up @@ -56,11 +54,9 @@ def button_Called():
latitude, longitude, current_location = ipinfo()
one_call = mgr.one_call(lat=latitude,lon=longitude)
forecast_display_func('today')
#print("function button_called()")
def do_action():
global one_call,current_location
if(not (user_input_loc:=self.lineEdit.text())==""):
#print(user_input_loc)
reg = owm.city_id_registry()
list_of_loc = reg.locations_for(user_input_loc)
try:
Expand All @@ -74,7 +70,6 @@ def do_action():
else:
one_call = mgr.one_call(lat=latitude, lon=longitude)
def forecast_display_func(text1):
#print(one_call)

current_humidity,current_precipitation_percentage,current_status,current_temp,current_temp_feel,current_wind_speed= current_weather1(one_call)
flag=True
Expand Down Expand Up @@ -151,7 +146,6 @@ def forecast_display_func(text1):
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 3, 0, 1, 1)
self.textBrowser_2 = QtWidgets.QTextBrowser(self.centralwidget)
#self.textBrowser_2.setEnabled(True)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
Expand Down