Aztec Code generator in Python
PIL - Python Imaging Library (or Pillow)
data = 'Aztec Code 2D :)'
aztec_code = AztecCode(data)
aztec_code.save('aztec_code.png', module_size=4)
This code will generate an image file aztec_code.png
of an Aztec Code containing the text "Aztec Code 2D :)".
data = 'Aztec Code 2D :)'
aztec_code = AztecCode(data)
aztec_code.print_out()
This code will print out the resulting 19×19 (compact) Aztec Code to standard output as text.
## # ## ####
# ## ##### ###
# ## # # # ###
## # # ## ##
## # # # #
## ############ # #
### # ### #
## # ##### # ## #
# # # # ##
# # # # # # ###
## # # ## ##
#### # ##### ## #
# ## ## ##
## ########### #
## # ## ## #
## # ### # ##
############
## # # ## #
## # ## ### #
Written by Dmitry Alimov (delimtry) and packaged by Daniel Lenski (dlenski).
Released under The MIT License.