1. anatoly techtonik
  2. pycountry-patches

Commits

anatoly techtonik  committed 73f6ede

update README.txt, version and .hgignore

  • Participants
  • Parent commits 307b10b
  • Branches default

Comments (0)

Files changed (5)

File .hgignore

View file
  • Ignore whitespace
-\.pyc$
+\.pyc$
+^build$

File TODO.txt

View file
  • Ignore whitespace
+- Update locale data.
 - Watch usability of ISO 3166-2 integration.
 - See if ISO 639-3 should be included.
 - Clean up stale references to generate.py and buildbot recipes.

File setup.py

View file
  • Ignore whitespace
 
 setup(
     name='pycountry',
-    version = '0.12.1',
+    version = '0.12.1-patched',
     author='Christian Theune',
     author_email='ct@gocept.com',
     description='ISO country, subdivision, language, currency and script '

File src/pycountry.egg-info/PKG-INFO

View file
  • Ignore whitespace
 Metadata-Version: 1.0
 Name: pycountry
-Version: 0.12.1
+Version: 0.12.1-patched
 Summary: ISO country, subdivision, language, currency and script definitions and their translations
 Home-page: UNKNOWN
 Author: Christian Theune
         pycountry provides the ISO databases for the standards:
         
         639
-        Languages
+          Languages
         
         3166
-        Countries
+          Countries
         
         3166-2
-        Subdivisions of countries
+          Subdivisions of countries
         
         4217
-        Currencies
+          Currencies
         
         15924
-        Scripts
+          Scripts
         
         The package includes a copy from Debian's `pkg-isocodes` and makes the data
         accessible through a Python API.
         Countries are accessible through a database object that is already configured
         upon import of pycountry and works as an iterable:
         
-        >>> import pycountry
-        >>> len(pycountry.countries)
-        246
-        >>> list(pycountry.countries)[0]
-        <pycountry.db.Country object at 0x...>
+          >>> import pycountry
+          >>> len(pycountry.countries)
+          246
+          >>> list(pycountry.countries)[0]
+          <pycountry.db.Country object at 0x...>
         
         Specific countries can be looked up by their various codes and provide the
         information included in the standard as attributes:
         
-        >>> germany = pycountry.countries.get(alpha2='DE')
-        >>> germany
-        <pycountry.db.Country object at 0x...>
-        >>> germany.alpha2
-        'DE'
-        >>> germany.alpha3
-        'DEU'
-        >>> germany.numeric
-        '276'
-        >>> germany.name
-        'Germany'
-        >>> germany.official_name
-        'Federal Republic of Germany'
+          >>> germany = pycountry.countries.get(alpha2='DE')
+          >>> germany
+          <pycountry.db.Country object at 0x...>
+          >>> germany.alpha2
+          'DE'
+          >>> germany.alpha3
+          'DEU'
+          >>> germany.numeric
+          '276'
+          >>> germany.name
+          'Germany'
+          >>> germany.official_name
+          'Federal Republic of Germany'
         
         Note that historic countries, defined by the ISO 3166-3 sub-standard are not
         included in this list.
         
         All subdivisons can be accessed directly:
         
-        >>> len(pycountry.subdivisions)
-        4548
-        >>> list(pycountry.subdivisions)[0]
-        <pycountry.db.Subdivision object at 0x...>
+          >>> len(pycountry.subdivisions)
+          4548
+          >>> list(pycountry.subdivisions)[0]
+          <pycountry.db.Subdivision object at 0x...>
         
         Subdivisions can be accessed using their unique code and provide at least
         their code, name and type:
         
-        >>> de_st= pycountry.subdivisions.get(code='DE-ST')
-        >>> de_st.code
-        'DE-ST'
-        >>> de_st.name
-        'Sachsen-Anhalt'
-        >>> de_st.type
-        'State'
-        >>> de_st.country
-        <pycountry.db.Country object at 0x...>
+          >>> de_st= pycountry.subdivisions.get(code='DE-ST')
+          >>> de_st.code
+          'DE-ST'
+          >>> de_st.name
+          'Sachsen-Anhalt'
+          >>> de_st.type
+          'State'
+          >>> de_st.country
+          <pycountry.db.Country object at 0x...>
         
         Some subdivisions specify another subdivision as a parent:
         
-        >>> al_br = pycountry.subdivisions.get(code='AL-BU')
-        >>> al_br.code
-        'AL-BU'
-        >>> al_br.name
-        u'Bulqiz\xeb'
-        >>> al_br.type
-        'District'
-        >>> al_br.parent_code
-        'AL-09'
-        >>> al_br.parent
-        <pycountry.db.Subdivision object at 0x...>
-        >>> al_br.parent.name
-        u'Dib\xebr'
+          >>> al_br = pycountry.subdivisions.get(code='AL-BU')
+          >>> al_br.code
+          'AL-BU'
+          >>> al_br.name
+          u'Bulqiz\xeb'
+          >>> al_br.type
+          'District'
+          >>> al_br.parent_code
+          'AL-09'
+          >>> al_br.parent
+          <pycountry.db.Subdivision object at 0x...>
+          >>> al_br.parent.name
+          u'Dib\xebr'
         
         The divisions of a single country can be queried using the country_code index:
         
-        >>> len(pycountry.subdivisions.get(country_code='DE'))
-        16
+          >>> len(pycountry.subdivisions.get(country_code='DE'))
+          16
         
-        >>> len(pycountry.subdivisions.get(country_code='US'))
-        57
+          >>> len(pycountry.subdivisions.get(country_code='US'))
+          57
+        
+        If country doesn't have subdivisions, an empty set is returned:
+          
+          >>> pycountry.subdivisions.get(country_code='AI')
+          set([])
         
         
         Scripts (ISO 15924)
         
         Scripts are available from a database similar to the countries:
         
-        >>> len(pycountry.scripts)
-        146
-        >>> list(pycountry.scripts)[0]
-        <pycountry.db.Script object at 0x...>
+          >>> len(pycountry.scripts)
+          146
+          >>> list(pycountry.scripts)[0]
+          <pycountry.db.Script object at 0x...>
         
-        >>> latin = pycountry.scripts.get(name='Latin')
-        >>> latin
-        <pycountry.db.Script object at 0x...>
-        >>> latin.alpha4
-        'Latn'
-        >>> latin.name
-        'Latin'
-        >>> latin.numeric
-        '215'
+          >>> latin = pycountry.scripts.get(name='Latin')
+          >>> latin
+          <pycountry.db.Script object at 0x...>
+          >>> latin.alpha4
+          'Latn'
+          >>> latin.name
+          'Latin'
+          >>> latin.numeric
+          '215'
         
         
         Currencies (ISO 4217)
         
         The currencies database is, again, similar to the ones before:
         
-        >>> len(pycountry.currencies)
-        182
-        >>> list(pycountry.currencies)[0]
-        <pycountry.db.Currency object at 0x...>
+          >>> len(pycountry.currencies)
+          182
+          >>> list(pycountry.currencies)[0]
+          <pycountry.db.Currency object at 0x...>
         
-        >>> argentine_peso = pycountry.currencies.get(letter='ARS')
-        >>> argentine_peso
-        <pycountry.db.Currency object at 0x...>
-        >>> argentine_peso.letter
-        'ARS'
-        >>> argentine_peso.name
-        'Argentine Peso'
-        >>> argentine_peso.numeric
-        '032'
+          >>> argentine_peso = pycountry.currencies.get(letter='ARS')
+          >>> argentine_peso
+          <pycountry.db.Currency object at 0x...>
+          >>> argentine_peso.letter
+          'ARS'
+          >>> argentine_peso.name
+          'Argentine Peso'
+          >>> argentine_peso.numeric
+          '032'
         
         
         Languages (ISO 639)
         
         The languages database is similar too:
         
-        >>> len(pycountry.languages)
-        486
-        >>> list(pycountry.languages)[0]
-        <pycountry.db.Language object at 0x...>
+          >>> len(pycountry.languages)
+          486
+          >>> list(pycountry.languages)[0]
+          <pycountry.db.Language object at 0x...>
         
-        >>> aragonese = pycountry.languages.get(alpha2='an')
-        >>> aragonese.alpha2
-        'an'
-        >>> aragonese.bibliographic
-        'arg'
-        >>> aragonese.terminology
-        'arg'
-        >>> aragonese.name
-        'Aragonese'
+          >>> aragonese = pycountry.languages.get(alpha2='an')
+          >>> aragonese.alpha2
+          'an'
+          >>> aragonese.bibliographic
+          'arg'
+          >>> aragonese.terminology
+          'arg'
+          >>> aragonese.name
+          'Aragonese'
         
         Locales
         =======
         
         Here is an example translating language names:
         
-        >>> import gettext
-        >>> german = gettext.translation('iso3166', pycountry.LOCALES_DIR,
-        ...                              languages=['de'])
-        >>> german.install()
-        >>> _('Germany')
-        'Deutschland'
+          >>> import gettext
+          >>> german = gettext.translation('iso3166', pycountry.LOCALES_DIR,
+          ...                              languages=['de'])
+          >>> german.install()
+          >>> _('Germany')
+          'Deutschland'
         
         Changes
         =======
         
+        x.xx.x (2011-03-05)
+        -------------------
+        
+        - Fix KeyError exception for country without subdivisions.
+        
         0.12.1 (2010-04-21)
         -------------------
         
         - Remedy brown-bag release 0.12 which was missing all data files due to a bad
-        interaction between the build system for the data and zest.releaeser's
-        full-release script.
+          interaction between the build system for the data and zest.releaeser's
+          full-release script.
         
         
         0.12 (2010-04-20)
         - Follow Debian repository to git.
         
         - Upgrade data to revision 770fa9cd603f90f9fb982b32fe6f45d253f1d33e as
-        requested by #5488 and others.
+          requested by #5488 and others.
         
         - Reflect subdivision changes with how they reference their parents in the XML
-        (they used to use space as a separator but now use a hyphen).
+          (they used to use space as a separator but now use a hyphen).
         
         - Refactor index building structures a bit.
         
         - Remove superfluous 'code' index from subdivision database. (Together with
-        the data upgrade this also gets rid of all the annoying warnings as
-        described in #6667).
+          the data upgrade this also gets rid of all the annoying warnings as
+          described in #6667).
         
         - Some light PEP 8 improvements.
         
         0.10 (2008-06-26)
         -----------------
         
-        - Added support for country subdivisions (ISO 3166-2).
+        - Added support for country subdivisions (ISO 3166-2). 
         
         
         0.9

File src/pycountry.egg-info/SOURCES.txt

View file
  • Ignore whitespace
 Makefile
 TODO.txt
 bootstrap.py
-buildout.cfg
+setup.cfg
 setup.py
 src/pycountry/README.txt
 src/pycountry/__init__.py
 src/pycountry.egg-info/not-zip-safe
 src/pycountry.egg-info/requires.txt
 src/pycountry.egg-info/top_level.txt
-src/pycountry/databases/iso15924.xml
-src/pycountry/databases/iso3166.xml
-src/pycountry/databases/iso3166_2.xml
-src/pycountry/databases/iso4217.xml
-src/pycountry/databases/iso639.xml
+src/pycountry/databases/iso_15924.xml
+src/pycountry/databases/iso_3166.xml
+src/pycountry/databases/iso_3166_2.xml
+src/pycountry/databases/iso_4217.xml
+src/pycountry/databases/iso_639.xml
 src/pycountry/locales/af/LC_MESSAGES/iso3166.mo
 src/pycountry/locales/af/LC_MESSAGES/iso3166.po
 src/pycountry/locales/af/LC_MESSAGES/iso639.mo
 src/pycountry/locales/ar/LC_MESSAGES/iso3166.po
 src/pycountry/locales/ar/LC_MESSAGES/iso639.mo
 src/pycountry/locales/ar/LC_MESSAGES/iso639.po
-src/pycountry/locales/as/LC_MESSAGES/iso3166.mo
-src/pycountry/locales/as/LC_MESSAGES/iso3166.po
-src/pycountry/locales/as/LC_MESSAGES/iso639.mo
-src/pycountry/locales/as/LC_MESSAGES/iso639.po
 src/pycountry/locales/ast/LC_MESSAGES/iso3166.mo
 src/pycountry/locales/ast/LC_MESSAGES/iso3166.po
 src/pycountry/locales/ast/LC_MESSAGES/iso639.mo
 src/pycountry/locales/bg/LC_MESSAGES/iso639.po
 src/pycountry/locales/bn/LC_MESSAGES/iso3166.mo
 src/pycountry/locales/bn/LC_MESSAGES/iso3166.po
-src/pycountry/locales/bn_IN/LC_MESSAGES/iso3166.mo
-src/pycountry/locales/bn_IN/LC_MESSAGES/iso3166.po
-src/pycountry/locales/bn_IN/LC_MESSAGES/iso639.mo
-src/pycountry/locales/bn_IN/LC_MESSAGES/iso639.po
-src/pycountry/locales/br/LC_MESSAGES/iso15924.mo
-src/pycountry/locales/br/LC_MESSAGES/iso15924.po
 src/pycountry/locales/br/LC_MESSAGES/iso3166.mo
 src/pycountry/locales/br/LC_MESSAGES/iso3166.po
-src/pycountry/locales/br/LC_MESSAGES/iso4217.mo
-src/pycountry/locales/br/LC_MESSAGES/iso4217.po
 src/pycountry/locales/br/LC_MESSAGES/iso639.mo
 src/pycountry/locales/br/LC_MESSAGES/iso639.po
 src/pycountry/locales/bs/LC_MESSAGES/iso3166.mo
 src/pycountry/locales/ca/LC_MESSAGES/iso4217.po
 src/pycountry/locales/ca/LC_MESSAGES/iso639.mo
 src/pycountry/locales/ca/LC_MESSAGES/iso639.po
-src/pycountry/locales/crh/LC_MESSAGES/iso3166.mo
-src/pycountry/locales/crh/LC_MESSAGES/iso3166.po
-src/pycountry/locales/crh/LC_MESSAGES/iso3166_2.mo
-src/pycountry/locales/crh/LC_MESSAGES/iso3166_2.po
-src/pycountry/locales/crh/LC_MESSAGES/iso639.mo
-src/pycountry/locales/crh/LC_MESSAGES/iso639.po
-src/pycountry/locales/cs/LC_MESSAGES/iso15924.mo
-src/pycountry/locales/cs/LC_MESSAGES/iso15924.po
 src/pycountry/locales/cs/LC_MESSAGES/iso3166.mo
 src/pycountry/locales/cs/LC_MESSAGES/iso3166.po
 src/pycountry/locales/cs/LC_MESSAGES/iso3166_2.mo
 src/pycountry/locales/gl/LC_MESSAGES/iso639.po
 src/pycountry/locales/gu/LC_MESSAGES/iso3166.mo
 src/pycountry/locales/gu/LC_MESSAGES/iso3166.po
-src/pycountry/locales/gu/LC_MESSAGES/iso639.mo
-src/pycountry/locales/gu/LC_MESSAGES/iso639.po
 src/pycountry/locales/haw/LC_MESSAGES/iso3166.mo
 src/pycountry/locales/haw/LC_MESSAGES/iso3166.po
 src/pycountry/locales/he/LC_MESSAGES/iso15924.mo
 src/pycountry/locales/km/LC_MESSAGES/iso3166.po
 src/pycountry/locales/kn/LC_MESSAGES/iso3166.mo
 src/pycountry/locales/kn/LC_MESSAGES/iso3166.po
-src/pycountry/locales/kn/LC_MESSAGES/iso639.mo
-src/pycountry/locales/kn/LC_MESSAGES/iso639.po
 src/pycountry/locales/ko/LC_MESSAGES/iso15924.mo
 src/pycountry/locales/ko/LC_MESSAGES/iso15924.po
 src/pycountry/locales/ko/LC_MESSAGES/iso3166.mo
 src/pycountry/locales/lt/LC_MESSAGES/iso4217.po
 src/pycountry/locales/lt/LC_MESSAGES/iso639.mo
 src/pycountry/locales/lt/LC_MESSAGES/iso639.po
-src/pycountry/locales/lv/LC_MESSAGES/iso15924.mo
-src/pycountry/locales/lv/LC_MESSAGES/iso15924.po
 src/pycountry/locales/lv/LC_MESSAGES/iso3166.mo
 src/pycountry/locales/lv/LC_MESSAGES/iso3166.po
 src/pycountry/locales/lv/LC_MESSAGES/iso3166_2.mo
 src/pycountry/locales/nb/LC_MESSAGES/iso15924.po
 src/pycountry/locales/nb/LC_MESSAGES/iso3166.mo
 src/pycountry/locales/nb/LC_MESSAGES/iso3166.po
-src/pycountry/locales/nb/LC_MESSAGES/iso4217.mo
-src/pycountry/locales/nb/LC_MESSAGES/iso4217.po
 src/pycountry/locales/nb/LC_MESSAGES/iso639.mo
 src/pycountry/locales/nb/LC_MESSAGES/iso639.po
 src/pycountry/locales/ne/LC_MESSAGES/iso3166.mo
 src/pycountry/locales/oc/LC_MESSAGES/iso4217.po
 src/pycountry/locales/oc/LC_MESSAGES/iso639.mo
 src/pycountry/locales/oc/LC_MESSAGES/iso639.po
-src/pycountry/locales/or/LC_MESSAGES/iso3166.mo
-src/pycountry/locales/or/LC_MESSAGES/iso3166.po
-src/pycountry/locales/or/LC_MESSAGES/iso639.mo
-src/pycountry/locales/or/LC_MESSAGES/iso639.po
 src/pycountry/locales/pa/LC_MESSAGES/iso3166.mo
 src/pycountry/locales/pa/LC_MESSAGES/iso3166.po
-src/pycountry/locales/pa/LC_MESSAGES/iso639.mo
-src/pycountry/locales/pa/LC_MESSAGES/iso639.po
 src/pycountry/locales/pl/LC_MESSAGES/iso15924.mo
 src/pycountry/locales/pl/LC_MESSAGES/iso15924.po
 src/pycountry/locales/pl/LC_MESSAGES/iso3166.mo
 src/pycountry/locales/ta/LC_MESSAGES/iso3166.po
 src/pycountry/locales/ta/LC_MESSAGES/iso639.mo
 src/pycountry/locales/ta/LC_MESSAGES/iso639.po
-src/pycountry/locales/te/LC_MESSAGES/iso3166.mo
-src/pycountry/locales/te/LC_MESSAGES/iso3166.po
-src/pycountry/locales/te/LC_MESSAGES/iso639.mo
-src/pycountry/locales/te/LC_MESSAGES/iso639.po
 src/pycountry/locales/th/LC_MESSAGES/iso15924.mo
 src/pycountry/locales/th/LC_MESSAGES/iso15924.po
 src/pycountry/locales/th/LC_MESSAGES/iso3166.mo