File: fake_pycountry.py

package info (click to toggle)
python-csb43 0.10.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,048 kB
  • sloc: python: 11,036; sh: 101; makefile: 17
file content (22 lines) | stat: -rwxr-xr-x 510 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/python

# SPDX-FileCopyrightText: 2024 <wmj.py@gmx.com>
#
# SPDX-License-Identifier: LGPL-3.0-or-later

# -*- coding: utf-8 -*-

import pycountry

if __name__ == '__main__':

    print("# -*- coding: utf-8 -*-")
    print("from __future__ import unicode_literals")
    print("CURRENCY_DATA = [")
    for el in pycountry.currencies:
        alpha_3 = getattr(el, 'alpha_3', None)
        numeric = getattr(el, 'numeric', None)
        print("    %s," % ((alpha_3, numeric),))

    print("]")
    print()