File: get_debconf_country_selection.py

package info (click to toggle)
tryton-server 7.0.30-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 7,756 kB
  • sloc: python: 53,218; xml: 5,194; sh: 802; sql: 217; makefile: 28
file content (15 lines) | stat: -rwxr-xr-x 408 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env python3
import locale
import pycountry

locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
selection = [' - '.join(
        [c.name.replace(',', ' '), c.alpha_2]) for c in pycountry.countries]
selection.sort()
print(' '.join(['Choices:',
        str(selection).
            replace("'", '').
            replace('"', '').
            replace('[', '').
            replace(']', '')
            ]))