kai zhu <[email protected]> added the comment:
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
----------
Added file: http://bugs.python.org/file14768/_asciiporn.c
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue6239>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com