It's ok, problem solved ... just bad indentation, i'm noob with python :/ ... Thanks a lot !
On Sun, Jun 28, 2009 at 1:54 AM, Nicolas Dumazet <[email protected]> wrote: > Hello! > > 2009/6/27 reyman <[email protected]>: > > Here my family wikiSimpop_family.py : > > > > # -*- coding: utf-8 > > -*- > > import family > > > > class Family(family.Family): > > def __init__(self): > > family.Family.__init__(self) > > self.name = 'wikiSimpop' > > > > self.langs = { > > 'fr': > > 'wikiSimpop', > > } > > > > self.namespaces[4] = { > > '_default': [u'wikiSimpop', self.namespaces[4]['_default']], > > 'fr': u'wikiSimpop', > > } > > > > def scriptpath(self, code): > > return '/wikiSimpop' > > It looks like your indentation is wrong. Is it only the paste not > keeping correct indentation level? Because indentation _does_ matter > for Python :) > > scriptpath( ) should be a class member Family, hence "def scriptpath" > should have the same indentation level as "def __init__", otherwise > Python does not define scriptpath as a Family method, but as a > function, and Family.scriptpath() is not overridden. > > > As an unrelated note, > > > self.namespaces[4] = { > > '_default': [u'wikiSimpop', self.namespaces[4]['_default']], > > 'fr': u'wikiSimpop', > > } > > you probably don't want to override _default. It's default, leave it as it > is :) > > > self.namespaces[4]['fr'] = u'wikiSimpop' > > should be good enough :) > > > Bonne chance, ^^ > -- > Nicolas Dumazet — NicDumZ [ nɪk.d̪ymz ] > > _______________________________________________ > Pywikipedia-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l > -- -- ---d[ o_O ]b------------------------------------------------------- @ Msn > [email protected] @ Mail > [email protected] @ Blog > http://reyman.mutualworks.net @ Wikipedia > http://fr.wikipedia.org/wiki/Utilisateur:Reyman
_______________________________________________ Pywikipedia-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
