View Single Post
Old 11-23-2008, 06:56 PM   #7
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Quote:
Originally Posted by kovidgoyal View Post
Yeah that would be it. I'm disabling the locale settings in those recipes. One way to acheive what you want is to overload the download function in the recipe, something like this:

Code:
def download(self, *args, **kwargs):
  self.timefmt = 'set this to a lcoalized string'
  return BasicNewsRecipe.download(self, *args, **kwargs)
That does not resolve the issue since the problem is not the format but the actual localized values of days in week and months.

I'm not that fluent with python but is there something like constructor/destructor in python class? Because if there is I would be able to modify the class to set locale on construction and revert it to the original one in destructor.
kiklop74 is offline   Reply With Quote