Message91856
wrote an extension application which relies on the patch (works after
applying patch to python 3.1.1).
it converts png images to colorized ascii-art on ansi-compatible
terminal. requires the patch b/c a ctype function returns a c-string w/
ansi-escape characters.
>>> import ctypes
>>> lib = ctypes.cdll.LoadLibrary("_asciiporn.so")
>>> lib.img_read(b"foo.png") // load png image
>>> lib.asc_itp(4, 16) // ascii-rize algorithm
>>> lib.asc_str.restype = ctypes.c_char_p
>>> print( lib.asc_str() ) // prints out ansi-colorized ascii-art
hopefully, this is more motivation to commit the patch to trunk |
|
Date |
User |
Action |
Args |
2009-08-22 07:20:09 | kaizhu | set | recipients:
+ kaizhu, theller, georg.brandl, vstinner, benjamin.peterson |
2009-08-22 07:20:09 | kaizhu | set | messageid: <1250925609.49.0.813798806834.issue6239@psf.upfronthosting.co.za> |
2009-08-22 07:20:07 | kaizhu | link | issue6239 messages |
2009-08-22 07:20:07 | kaizhu | create | |
|