Отправляет email-рассылки с помощью сервиса Sendsay

[TC] Погодный плагин для нвда. проблеммы.

Приветствую всех.

Скачал и установил я этот плагин, но вот все остальное проделать не
получается, за исключением того, что список городов появился.

По той ссылке, где надо после равно писать свой город- не пишется, потому
что буквенные клавиши- навигационные: хочу написать- уфа, нажимаю букву- ю.
говорят, что нет не посещеных ссылок, а в инит пи, вот такая штука: "
#-*- coding: utf-8 -*-
#Weather Plus Addon for NVDA

#Weather and 24 hour forecast
#Originally written by Storm Dragon and Patrick ZAJDA
#improved and translated into Italian by Adriano Barbieri
#Email: adrianoba***@y*****.it
#Version 2.4
#License GNU GPL

import os,sys, tones
import globalPluginHandler, scriptHandler, languageHandler, addonHandler
import ui, urllib, gui, wx
#include the module directory to the path
sys.path.append(os.path.dirname(__file__))
from xml2.dom import minidom
del sys.path[-1]

import config
from configobj import *
import globalVars

addonHandler.initTranslation()

class GlobalPlugin(globalPluginHandler.GlobalPlugin):

def __init__(self):

self.title = "Weather Plus"
self.tempScale = ["Fahrenheit", "Celsius"]
self.d = None
self.dom = ''
self.defaultZipCode = ''
self.tempZipCode = ''
self.zipCodesList = self.LoadZipCodes()
self.ReadConfig()

super(globalPluginHandler.GlobalPlugin, self).__init__()
self.menu =
gui.mainFrame.sysTrayIcon.menu.GetMenuItems()[0].GetSubMenu()
self.WeatherMenu = wx.Menu()
self.mainItem = self.menu.AppendSubMenu(self.WeatherMenu, _("Weather
Plus &Settings"), _("Show configuration items."))
self.id = self.mainItem.GetId()
self.setZipCodeItem = self.WeatherMenu.Append(wx.ID_ANY, _("Set and
&Manage Zip Codes..."), _("Displays or allows to set the current Zip Code
from a list"))
gui.mainFrame.sysTrayIcon.Bind(wx.EVT_MENU, self.onSetZipCodeDialog,
self.setZipCodeItem)
self.AboutItem = self.WeatherMenu.Append(wx.ID_ANY,
_("&Documentation"), _("Opens the help file for the current language"))
self.AboutItem.Enable(self.isDocFolder())
gui.mainFrame.sysTrayIcon.Bind(wx.EVT_MENU, self.onAbout,
self.AboutItem)

def terminate(self):
try:
self.menu.RemoveItem(self.mainItem)
except wx.PyDeadObjectError:
pass

def onSetZipCodeDialog(self, evt):
#Opens the Settings window

dlg = EnterDataDialog(gui.mainFrame, message = _("Enter a valid Zip
Code, or choose one from the list if available."),
title = '%s %s - (%s: %s)' % (self.title, _("Settings"),
_("Preset"), self.defaultZipCode or _("None")),
defaultZipCode = self.defaultZipCode,
zipCode = self.zipCode,
city = self.city,
dom = self.dom,
tempScale = self.tempScale,
celsius = self.celsius)

if dlg.ShowModal() == wx.ID_OK:
zipCodesList, defaultZipCode, self.tempZipCode, modifiedList,
celsius = dlg.GetValue()

if modifiedList:
#Save current list of zip code
self.WriteList(zipCodesList)
self.zipCodesList = zipCodesList
if celsius != self.celsius or defaultZipCode !=
self.defaultZipCode:
#Save predefined city, temp scale & zipCode
if celsius != self.celsius:self.celsius = celsius
if defaultZipCode != self.defaultZipCode:
self.ExtractData(defaultZipCode)
self.defaultZipCode = defaultZipCode
self.SaveConfig()

#Set temporary Zip Code
self.ExtractData(self.tempZipCode)
dlg.Destroy()
self.Patch_menu() #IMPORTANT! Provisional to eliminate items
duplication in the preferences menu

def setZipCodeDialog(self):
#Create a dialog box for temporary ZipCode entry

try:
if self.d.IsShown(): wx.Bell(); return
except AttributeError: pass

try:
s = 0
s = self.zipCodesList.index(self.tempZipCode)
except (IndexError, ValueError): s = None
title = '%s - %s' % (self.title, _("Setting up a temporary Zip
Code"))
d = wx.SingleChoiceDialog(gui.mainFrame, _("Zip Code List
available:"), title, choices=self.zipCodesList)
if s!= None: d.SetSelection(s)
self.d = d

def callback(result):
if result == wx.ID_OK:
wx.CallLater(100, self.doSetZipCode, d.GetSelection(), s)
gui.runScriptModalDialog(d, callback)

def doSetZipCode(self, selection, s):
self.tempZipCode = self.zipCodesList[selection]
self.ExtractData(self.tempZipCode)
if s != None and self.tempZipCode != self.zipCodesList[s]:
self.Beep(True)

def onAbout(self, evt):
try:
os.startfile(self._docFolder)
except WindowsError:
ui.message (_("Documentation not available for the current
language!"))

def isDocFolder(self):
lang = languageHandler.getLanguage()
if "_" in lang:
lang = lang.split("_")[0]
docFolder = os.path.dirname(__file__)
listDocs = os.listdir(docFolder.split("globalPlugins")[0]+"\\doc\\")
if lang not in listDocs: lang = 'en'
docFolder = docFolder.split("globalPlugins")[0]+"\\doc\\"+lang
if os.path.exists(docFolder):
self._docFolder = docFolder
return True
else:
return False

def Patch_menu(self):
''' Patch to eliminate duplicates menu items in the preferences :P
I still have not figured out why NVDA do so after you have
instantiated this dialog box :(
'''

subMenuItem = self.menu.FindItemById(int(self.id))
label = subMenuItem.GetLabel()
duplicated = [x.GetLabel() for x in
self.menu.GetMenuItems()].count(label)
subMenu = subMenuItem.GetMenu()
for pos in reversed(range(subMenu.GetMenuItemCount())):
item =subMenu.FindItemByPosition(pos)
try:
if label ==item.GetLabel():
if duplicated >= 2: subMenu.RemoveItem(item);
duplicated -= 1
except AttributeError: pass

def ExtractData(self, v):
#Extract city and zipCode from zipCode string

try:
self.zipCode = v.split()[-1]
except IndexError: pass
try:
self.city = v[:-len(self.zipCode)-1].decode('latin-1')
except: self.city = v[:-len(self.zipCode)-1]
if not self.city: self.city = self.ReadCityName(self.zipCode)

def LoadZipCodes(self):
#Load list of zip codes

#citiesPath = os.path.join(os.path.dirname(__file__), 'Cities.txt')
citiesPath =
os.path.join(globalVars.appArgs.configPath,"Weather.zipcodes")

cities = {}
zipCodesList = []
if os.path.isfile(citiesPath):
with open(citiesPath, 'rb') as file:
for r in file:
if r != '':
cities[r.split('\t')[0]] =
r.split('\t')[1].upper().strip('\r\n')
zipCodesList = ['%s %s' % (k.capitalize(), cities[k].upper())
for k in sorted(cities.keys())]
return zipCodesList

def ReadConfig(self):
#Read configuration set from Weather.ini

self.city, self.zipCode, self.celsius = '', '', 1 #Default value
#config_weather = os.path.join(os.path.dirname(__file__),
"Weather.ini")
config_weather =
os.path.join(globalVars.appArgs.configPath,"Weather.ini")
if os.path.isfile(config_weather):
config = ConfigObj(config_weather)
try:
self.celsius = eval(config['Weather Settings']['Celsius'])
self.zipCode = config['Weather Settings']['Zip Code']
except (KeyError, IOError):
self.Beep(False)
return ui.message(_("I can not load the settings!"))

if not self.zipCodesList: self.city =
self.ReadCityName(self.zipCode); return
v = self.FindCity(self.zipCode)
if v == False: self.city = self.ReadCityName(self.zipCode);
return
try:
self.city = v[:-len(self.zipCode)-1].decode('latin-1')
except: self.city = v[:-len(self.zipCode)-1]

self.defaultZipCode = '%s %s' % (self.city.capitalize(),
self.zipCode.upper())
self.tempZipCode = self.defaultZipCode.encode('latin1')

def SaveConfig(self):
#Save datas into configuration Weather.ini

config = ConfigObj()
#config_weather = os.path.join(os.path.dirname(__file__),
"Weather.ini")
config_weather =
os.path.join(globalVars.appArgs.configPath,"Weather.ini")

config.filename = config_weather
config ["Weather Settings"] = {"Celsius": self.celsius, "Zip Code":
self.zipCode}
try:
config.write()
except IOError:
self.Beep(False)
return ui.message(_("I can not save the settings!"))

def WriteList(self, zipCodesList):
#Save to list cities

#citiesPath = os.path.join(os.path.dirname(__file__), 'Cities.txt')
citiesPath =
os.path.join(globalVars.appArgs.configPath,"Weather.zipcodes")

with open(citiesPath, 'wb') as file:
for r in sorted(zipCodesList):
r = "%s\t%s\r\n" % (r[:-len(r.split()[-1])-1],
r.split()[-1])
file.write(r)

def FindCity(self, zipCode):
#Find the name of the city from zipCodesList

lzc = [x.split()[-1] for x in self.zipCodesList]
try:
i = False
i = lzc.index(zipCode)
except (IndexError, ValueError): return i
return self.zipCodesList[i]

def ReadCityName(self, zip_code):
#reads the name of the city from internet

dom = self.WeatherConnect(zip_code)
if not dom: return 'Error'
city = dom.getElementsByTagName('title')[0].firstChild.data
return city[17:]

def Beep(self, t):
if t == False:
tones.beep(115,300)
else:
tones.beep(1200, 150)

def WeatherConnect(self, zip_code):
WEATHER_URL = 'http://xml.weather.yahoo.com/forecastrss?p=%s'
if self.celsius ==
1:WEATHER_URL='http://xml.weather.yahoo.com/forecastrss?u=c&p=%s'
url = WEATHER_URL % zip_code
try:
dom = minidom.parse(urllib.urlopen(url))
except IOError:
self.Beep(False)
ui.message(_("Sorry, function not available, verify that your
internet connection is active!"))
return False
pass
return dom

#Main getWeather function gets weather from Yahoo
def getWeather(self, zip_code, forecast = False):
if zip_code != "":
self.dom = self.WeatherConnect(zip_code)
if not self.dom: return
WEATHER_NS = 'http://xml.weather.yahoo.com/ns/rss/1.0'
forecasts = []
for node in self.dom.getElementsByTagNameNS(WEATHER_NS,
'forecast'):
forecasts.append(node.getAttribute('text'))
forecasts.append(node.getAttribute('high'))
forecasts.append(node.getAttribute('low'))

try:
ycondition = self.dom.getElementsByTagNameNS(WEATHER_NS,
'condition')[0]
except IndexError:
self.Beep(False)
return _("Sorry, the Zip Code set is not valid!")
pass
weatherReport = '%s %s %s %s %s %s' % (_("In"), self.city[:-3],
_("The Weather Report is currently"), ycondition.getAttribute('temp'), _("
degrees"), ycondition.getAttribute('text'))
if forecast == True: weatherReport = '%s %s %s %s %s %s %s %s
%s' % (_("In"), self.city[:-3], _("the forecast for today is"),
str(forecasts[0]), _("with a maximum temperature of"), forecasts[1], _("and
a minimum of"), forecasts[2], _("degrees"))
#These are neccessarie for localization
weatherReport = weatherReport.replace("AM", _("in the morning"))
weatherReport = weatherReport.replace("PM", _("in the evening"))
weatherReport = weatherReport.replace("/", _(" and "))
weatherReport = weatherReport.replace("Sunny Intervals",
_("sunny intervals"))
weatherReport = weatherReport.replace("Sunny Interval", _("sunny
intervals"))
weatherReport = weatherReport.replace("Sunny Period", _("sunny
period"))
weatherReport = weatherReport.replace("Light Snow", _("light
snow"))
weatherReport = weatherReport.replace("Snow Showers", _("snow
showers"))
weatherReport = weatherReport.replace("Snowstorm",
_("snowstorm"))
weatherReport = weatherReport.replace("Snowdrift",
_("snowdrift"))
weatherReport = weatherReport.replace("Blizzard", _("blizzard"))
weatherReport = weatherReport.replace("Blowing Snow", _("blowing
snow"))
weatherReport = weatherReport.replace("Snow", _("snow"))
weatherReport = weatherReport.replace("Light Rain with Thunder",
_("light rain with thunder"))
weatherReport = weatherReport.replace("Few Showers", _("few
showers"))
weatherReport = weatherReport.replace("Heavy Showers", _("heavy
showers"))
weatherReport = weatherReport.replace("Lightning",
_("lightning"))
weatherReport = weatherReport.replace("Isolated Clouds",
_("isolated clouds"))
weatherReport = weatherReport.replace("Partly Cloudy", _("partly
cloudy"))
weatherReport = weatherReport.replace("Partly Bright", _("partly
bright"))
weatherReport = weatherReport.replace("Showers Early",
_("showers early"))
weatherReport = weatherReport.replace("Light Rain", _("light
rain"))
weatherReport = weatherReport.replace("Isolated Showers",
_("isolated showers"))
weatherReport = weatherReport.replace("Mostly Cloudy", _("mostly
cloudy"))
weatherReport = weatherReport.replace("Mostly Dry", _("mostly
dry"))
weatherReport = weatherReport.replace("Mostly Clear", _("mostly
clear"))
weatherReport = weatherReport.replace("Clearing", _("clearing"))
weatherReport = weatherReport.replace("No Rain", _("no rain"))
weatherReport = weatherReport.replace("Sleet", _("sleet"))
weatherReport = weatherReport.replace("Dust", _("dust"))
weatherReport = weatherReport.replace("Sand", _("sand"))
weatherReport = weatherReport.replace("Thundery Showers",
_("thundery showers"))
weatherReport = weatherReport.replace("Thundershowers",
_("thundershowers"))
weatherReport = weatherReport.replace("Scattered Thunderstorms",
_("scattered thunderstorms"))
weatherReport = weatherReport.replace("Thunderstorms",
_("thunderstorms"))
weatherReport = weatherReport.replace("Thunderstorm",
_("thunderstorm"))
weatherReport = weatherReport.replace("Storm", _("storm"))
weatherReport = weatherReport.replace("Hail", _("hail"))
weatherReport = weatherReport.replace("Foggy", _("foggy"))
weatherReport = weatherReport.replace("Fog", _("fog"))
weatherReport = weatherReport.replace("Haze", _("haze"))
weatherReport = weatherReport.replace("Mist", _("mist"))
weatherReport = weatherReport.replace("Clear", _("clear"))
weatherReport = weatherReport.replace("Fair", _("fair"))
weatherReport = weatherReport.replace("Fine", _("fine"))
weatherReport = weatherReport.replace("Overcast", _("overcast"))
weatherReport = weatherReport.replace("Light Showers", _("light
showers"))
weatherReport = weatherReport.replace("Light Drizzle", _("light
drizzle"))
weatherReport = weatherReport.replace("Freezing Rain",
_("freezing rain"))
weatherReport = weatherReport.replace("Frequent Showers",
_("frequent showers"))
weatherReport = weatherReport.replace("Rain", _("rain"))
weatherReport = weatherReport.replace("Drizzle", _("drizzle"))
weatherReport = weatherReport.replace("Showers", _("showers"))
weatherReport = weatherReport.replace("Dry", _("dry"))
weatherReport = weatherReport.replace("Mild", _("mild"))
weatherReport = weatherReport.replace("Clouds", _("clouds"))
weatherReport = weatherReport.replace("Cloudy", _("cloudy"))
weatherReport = weatherReport.replace("Mostly Sunny", _("mostly
sunny"))
weatherReport = weatherReport.replace("Sunny", _("sunny"))
weatherReport = weatherReport.replace("Sun", _("sun"))
weatherReport = weatherReport.replace("Bright", _("bright"))
weatherReport = weatherReport.replace("Thunder", _("thunder"))
weatherReport = weatherReport.replace("Shower", _("shower"))
weatherReport = weatherReport.replace("Windy", _("windy"))
weatherReport = weatherReport.replace("Wind", _("wind"))
weatherReport = weatherReport.replace("Flurries", _("flurries"))
weatherReport = weatherReport.replace("Late", _("late"))
weatherReport = weatherReport.replace("Early", _("early"))
weatherReport = weatherReport.replace("Isolated", _("isolated"))
weatherReport = weatherReport.capitalize()
else:
self.Beep(False)
weatherReport = _("Sorry, the Zip Code is not set!")
return weatherReport

def script_announceWeather(self, gesture):
ui.message(self.getWeather(self.zipCode))

script_announceWeather.__doc__ = _("Provides the current temperature and
weather conditions.")

def script_announceForecast(self, gesture):
ui.message(self.getWeather(self.zipCode, True))

script_announceForecast.__doc__ = _("Provides the weather forecast and
temperature for the next 24 hours.")

def script_zipCodeEntry(self, gesture):
if not self.zipCodesList:
self.Beep(False)
return ui.message(_("Sorry, no list available!"))
self.setZipCodeDialog()

script_zipCodeEntry.__doc__ = _("Allows you to set a temporary Zip
Code.")

__gestures={
"kb:NVDA+w": "announceWeather",
"kb:NVDA+shift+w": "announceForecast",
"kb:nvda+shift+control+w": "zipCodeEntry"
}

class EnterDataDialog(wx.Dialog):
''' Dialog for managing zip codes '''

def __init__(self, parent, id=-1, title=wx.EmptyString,
pos= wx.DefaultPosition, size=wx.DefaultSize,
style=wx.DEFAULT_DIALOG_STYLE, name=wx.DialogNameStr, message =
'',
defaultZipCode = '', zipCode = '', city = '', dom = '',
tempScale = [], celsius = None):
wx.Dialog.__init__(self, parent=parent, id=id, title=title, pos=pos,
size=size, style=style, name=name)

sizer = wx.BoxSizer(wx.VERTICAL)

zipCodesList = GlobalPlugin().LoadZipCodes()

if message:
sizer.Add(wx.StaticText(self, -1, message), 0, wx.ALL, 5)
sizer.Add(wx.StaticLine(self), 0,
wx.EXPAND|wx.LEFT|wx.RIGHT|wx.BOTTOM, 5)

hbox=wx.BoxSizer(wx.HORIZONTAL)
cbx=wx.ComboBox(self, -1, style=wx.CB_DROPDOWN|wx.TE_RICH, choices =
zipCodesList)
try:
i = zipCodesList.index(defaultZipCode)
cbx.SetSelection(i)
except (ValueError, IndexError): pass
if not cbx.GetValue(): cbx.SetValue('%s %s' % (city.capitalize(),
zipCode.upper()))
cbx.SetInsertionPoint(0)

hbox.Add(cbx, 0, wx.EXPAND|wx.ALL, 5)
self.cbx = cbx
self.zipCodesList = zipCodesList
self.defaultZipCode = defaultZipCode
self.dom = dom
self.modifiedList = False
#self.modifiedDefault = False

btn_Test = wx.Button(self, -1, _("Test"), style=wx.BU_EXACTFIT)
hbox.Add(btn_Test, 0, wx.EXPAND|wx.ALL, 5)
btn_Add = wx.Button(self, -1, _("Add"), style=wx.BU_EXACTFIT)
hbox.Add(btn_Add, 0, wx.EXPAND|wx.LEFT|wx.TOP|wx.BOTTOM, 5)
btn_Apply = wx.Button(self, -1, _("Preset"), style=wx.BU_EXACTFIT)
hbox.Add(btn_Apply, 0, wx.EXPAND|wx.TOP|wx.BOTTOM, 5)
btn_Remove = wx.Button(self, -1, _("Remove"), style=wx.BU_EXACTFIT)
hbox.Add(btn_Remove, 0, wx.EXPAND|wx.TOP|wx.RIGHT|wx.BOTTOM, 5)

self.Bind(wx.EVT_TEXT, self.OnText, cbx)
self.Bind(wx.EVT_BUTTON, self.OnTest, btn_Test)
self.Bind(wx.EVT_BUTTON, self.OnAdd, btn_Add)
self.Bind(wx.EVT_BUTTON, self.OnApply, btn_Apply)
self.Bind(wx.EVT_BUTTON, self.OnRemove, btn_Remove)

self.btn_Test = btn_Test
self.btn_Add = btn_Add
self.btn_Remove = btn_Remove
self.btn_Apply = btn_Apply

sizer.Add(hbox)

self.rb=wx.RadioBox(
self, -1, _("Scale of temperature measurement:"),
wx.DefaultPosition, wx.DefaultSize, tempScale,
2, style=wx.RB_GROUP)
self.rb.SetSelection(celsius)
sizer.Add(self.rb, 0, wx.ALL, 5)

sizer.Add(self.CreateButtonSizer(wx.OK|wx.CANCEL), 0, wx.CENTRE|
wx.ALL|wx.EXPAND, 5)
self.btn_Ok = self.FindWindowById(wx.ID_OK)

self.ButtonsEnable(False)
self.OnText()
if cbx.GetValue == '':
self.rb.Enable(False)
self.btn_Ok.Enable(False)

cbx.SetFocus()
self.SetSizerAndFit(sizer)
self.Centre

def ButtonsEnable(self, flag):
self.btn_Test.Enable(flag)
self.btn_Add.Enable(flag)
self.btn_Apply.Enable(flag)
self.btn_Remove.Enable(flag)

def ZipCodeInList(self, v):
#Check if it already exists Zip Code

t = False
zc = self.GetZipCode(v).upper()
for n in self.zipCodesList:
zc1 = self.GetZipCode(n).upper()
if zc == zc1:
t = True; break
return t, zc

def OnText(self, evt = None):
#ComboBox Text Entry Event

v = self.cbx.GetValue()
check, v1 = self.ZipCodeInList(v)
if not check:
self.btn_Test.Enable(True)
self.btn_Add.Enable(True)
self.btn_Apply.Enable(True)
self.btn_Remove.Enable(False)
else:
self.btn_Test.Enable(False)
self.btn_Add.Enable(False)
self.btn_Remove.Enable(True)
if v1 == self.GetZipCode(self.defaultZipCode):
self.btn_Apply.Enable(False)
self.btn_Remove.Enable(False)
else:
self.btn_Apply.Enable(True)
if v1 == '':
self.ButtonsEnable(False)
self.rb.Enable(False)
self.btn_Ok.Enable(False)
else:
if not self.rb.IsEnabled(): self.rb.Enable(True)
if not self.btn_Ok.IsEnabled(): self.btn_Ok.Enable(True)

def OnTest(self, evt):
#Button Test Zip Code Event

value = self.cbx.GetValue()
v = self.GetZipCode(value)
cityName = GlobalPlugin().ReadCityName(v)
if not 'Error' in cityName:
value = '%s %s' % (cityName.capitalize(), v.upper())
self.cbx.SetValue(value)
GlobalPlugin().Beep(True)
self.OnText()
self.btn_Test.Enable(False)
else:
GlobalPlugin().Beep(False)
self.ButtonsEnable(False)
self.btn_Ok.Enable(False)
self.cbx.SetFocus()
self.cbx.SetInsertionPoint(0)

def GetValue(self):
''' Return values ??from EnterDataDialog '''

return self.zipCodesList, self.defaultZipCode,
self.cbx.GetValue().encode('latin1'), self.modifiedList,
self.rb.GetSelection()

def OnAdd(self, evt):
#Add Zip Code Button Event

value = self.cbx.GetValue()
if value not in self.zipCodesList:
v = self.GetZipCode(value)
if not 'Error' in GlobalPlugin().ReadCityName(v):
self.zipCodesList.append(value.encode('latin1'))
self.ComboSet(value)
self.btn_Test.Enable(False)
self.btn_Add.Enable(False)
self.btn_Remove.Enable(True)
self.btn_Ok.Enable(True)
GlobalPlugin().Beep(True)
ui.message('%s %s' % (value, _("added to the list.")))
else:
GlobalPlugin().Beep(False)
self.ButtonsEnable(False)
self.btn_Ok.Enable(False)
ui.message('%s %s' % (value, _("is not a valid Zip Code!")))
else:
ui.message('%s %s' % (value, _("is already in the list!")))

def OnApply(self, evt):
#Apply predefined zip code button event

value = self.cbx.GetValue()
if value != self.defaultZipCode:
v = self.GetZipCode(value)
if not 'Error' in GlobalPlugin().ReadCityName(v):
self.defaultZipCode = value
if not self.ZipCodeInList(value):
self.zipCodesList.append(value.encode('latin1'))
self.ComboSet(value)
GlobalPlugin().Beep(True)
self.cbx.SetFocus()
self.btn_Apply.Enable(False)
self.btn_Remove.Enable(False)
self.btn_Ok.Enable(True)
ui.message('%s %s' % (value, _("Will be set as the default
Zip Code.")))
else:
GlobalPlugin().Beep(False)
self.ButtonsEnable(False)
self.rb.Enable(False)
self.btn_Ok.Enable(False)
ui.message('%s %s' % (value, _("Zip Code is not valid!")))

def GetZipCode(self, value):
#Testing zipCode

try:
v = ''
v = value.split()[-1]
except IndexError: pass
return v

def OnRemove(self, evt):
#Remove Zip Code from list Button Event

value = self.cbx.GetValue()
if value in self.zipCodesList:
self.zipCodesList.remove(value)
self.ComboSet('')
self.btn_Remove.Enable(False)
self.OnText()
ui.message('%s %s' % (value, _("has been removed from the
list.")))

def ComboSet(self, v):
#Update choices List ComboBox

self.cbx.Clear()
[self.cbx.Append(x) for x in sorted(self.zipCodesList)]
self.modifiedList = True
self.cbx.SetValue(v)
self.cbx.SetInsertionPoint(0)
self.cbx.SetFocus()"

это у меня так? или я что-то делаю не так? или понял не так?

заранее благодарен.

С уважением Андрей.

Ответить   Fri, 26 Sep 2014 16:23:24 +0500 (#3131192)

 

Ответы:

Здравствуйте!
Надо не внутри писать, когда уже зашли свой город, а после знака равно,
когда вставили строку в браузер.
Да и если вы скачали архив, где ваша страна есть, то список городов в
настройках плагина надо выбрать, а не на сайте. Туда идти уже незачем.

Дело в том, что мой город, когда я его выбираю, в этом списке, хватает на то
время, пока работает нвда, а после перезапуска, опять надо его выбирать.

Ответить   Fri, 26 Sep 2014 17:20:47 +0500 (#3131222)

 

26.09.2014 14:20, "Andrey Pavlov" пишет:

то

После того, как выбрали, нажмите установить табом или если английская
версия присет как-то так.
Потом сохраните конфигурацию и отпишитесь.

Да именно так и получилось: нажал присет, потом ок, и теперь город
сохранился.

Слава Богу!

Ответить   Fri, 26 Sep 2014 18:45:04 +0500 (#3131263)

 

Привет всем!
26.09.2014 16:20, "Andrey Pavlov" пишет:
Дело в том, что мой город, когда я его выбираю, в этом списке, хватает
на то время, пока работает нвда, а после перезапуска, опять надо его
выбирать.
Ответ.
Выбирать город надо в настройках: Weather Plus Settings Подменю. s Set
and Manage Zip Codes...
Очистите редактор или нажмите Кнопку Remove.
Нажмите первую букву города: U.
Стрелками выберите свой город.
Нажмите Кнопку Preset
Подтвердите OK Кнопка.

Ответить   Fri, 26 Sep 2014 16:26:25 +0400 (#3131255)

 

всем доброго времени суток
уважаемые подписчики
по делитесь пожалуйста если у кого есть
инструкцией по созданию авто загрузочной флешки с nvda
за ранее благодарен.

с уважением
Алексей Нахалов.

Ответить   Fri, 26 Sep 2014 16:50:08 +0400 (#3131264)

 

Привет, рассылка!

26.09.2014 16:50, Алексей нахалов пишет:

https://yadi.sk/d/kspDY5JfVQfW6

Ответить   Fri, 26 Sep 2014 16:54:48 +0400 (#3131267)

 

Привет всем!
26.09.2014 16:50, Алексей нахалов пишет:
по делитесь пожалуйста если у кого есть инструкцией по созданию авто
загрузочной флешки с nvda

Запуск NVDA вслепую с флэшки используя файл .cmd или .bat-файл
https://yadi.sk/i/6lcEZhe5bgVAi

С уважением, Василий. Волгоград.
E-mail: vasil_***@r*****.ru
Skype: vasil_dm3

Ответить   Fri, 26 Sep 2014 20:52:03 +0400 (#3131440)

 

Привет всем!
26.09.2014 15:23, "Andrey Pavlov" пишет:

Скачал и установил я этот плагин, но вот все остальное проделать не
получается, за исключением того, что список городов появился.

По той ссылке, где надо после равно писать свой город- не пишется, потому
что буквенные клавиши- навигационные: хочу написать- уфа, нажимаю букву- ю.

Ответ.
Уфа имеется в списке городов в файле Weather.zipcodes
Ufa, rs RSXX0111
дописывайте ufa в любом редакторе. Копируйте в буфер. Открываете браузер,
нажимаете F6 и вставляете из буфера.
http://xoap.weather.com/search/search?where=ufa
Используйте Nvda. Скопируйте в буфер и вставьте в текстовый документ.
Уфа четвертая в списке.

С этим XML-файлом не связана ни одна таблица стилей. Ниже показано дерево
элементов.
?<search ver="3.0">
<loc id="YMIB2473" type="1">`Ufar, IB, Yemen</loc>
<loc id="RSCB1495" type="1">Ufa, CB, Russia</loc>
<loc id="RSPM2653" type="1">Ufa, PM, Russia</loc>
<loc id="RSXX0111" type="1">Ufa, BA, Russia</loc>
<loc id="TUSR0465" type="1">Ufaca, 56, Turkey</loc>
<loc id="TZXX4870" type="1">Ufana, 26, United Republic Of Tanzania</loc>
<loc id="PUXX1477" type="1">Ufara, L, Guinea-bissau</loc>
<loc id="LIXX2600" type="1">Ufaka, GK, Liberia</loc>
<loc id="SUXX2668" type="1">`Ufaynah, 07, Sudan</loc>
<loc id="TUGI0490" type="1">Ufacik, 27, Turkey</loc>
</search>

Ответить   Fri, 26 Sep 2014 15:51:55 +0400 (#3131239)

 

ю.

...

Следите за размером писем. Объём текста в письме не может превышать 15 Кб.

Ответить   Fri, 26 Sep 2014 23:51:19 +0400 (#3131555)