Fun with Flags the Database Option

Fun with Flags - A homage to The Big Bang Theory.

flags_iso3166All.db is an sqlite3 database containing Png, Svg, Circular Svg and
Emoji images of Country’s Flags and Regional Flags, with a small set of country details, capital, languages etc and standard UTC timezone information, designed to work with wxPython.

This database option, is for those who might find it easier to use, than list comprehension over dictionaries, which can at least look daunting. Now it’s simple sql.

Requires cairosvg for the svg images.

Displaying SVG images via cairosvg can be problematic on Windows, whilst straightforward on Linux.

For those on the Windows platform, please read the relevant chapter in the ReadMe pdf file, for how to adapt SvgImage.py to add in the path to cairosvg DLL’s on your machine.
Again on Windows, the Emoji flag codes may not display, I believe this will be fixed in the next version of wxPython.

The demonstration programs (flagsdemo_db_all.py, flagsdemosvg2_db.py, lagsdemosvg3_db.py and flagsdemo4_db.py) attempt to give an example of many of the methods and properties, hopefully you will see how it can be used.
Please read the ReadMe pdf for full details.
These programs make extensive use of Emojis for speed of loading.

Again, for those on the Windows platform I have provided Png versions of the demonstration programs.
The Png versions (flagsdemo_db_all_png.py, flagsdemosvg2_db_png.py, flagsdemosvg3_db_png.py and flagsdemo4_db_png.py) are for those still using Windows without a version of wxPython that can display emoji codes.

flags_database_package.zip (2.3 MB)

As usual bugs, comments and insults, on a postcard please.
Regards,
Rolf

1 Like