skip to navigation
skip to content

asciiporn 2009.04.15

view color images & 3d scientific plots in ssh terminal (screenshots using putty ssh terminal included)

Downloads ↓

Latest Version: 2009.05.01

################################################################################
originally ascii art graphics library for ssh terminal,
but expanded to include scientific visualization.

this package has 2 main files:
  asciiporn/__init__.py ## initialize custom import hook to load main.py
  asciiporn/main.py     ## contains EVERYTHING

how to enable 256 color in putty:  http://www.emacswiki.org/emacs/PuTTY#toc2
how to enable 256 color in xterm:  http://www.frexx.de/xterm-256-notes/
how to enable 256 color in screen: http://www.frexx.de/xterm-256-notes/

AUTHOR:
  kai zhu
  kaizhu256@gmail.com

REQUIREMENTS:
  posix os
  Python 2.6
  Python Imaging Library  http://www.pythonware.com/products/pil
  numpy                   http://www.scipy.org/Download

INSTALL:
  python setup.py build
  python setup.py install
  python setup.py dev --quicktest

USAGE:
  $ python setup.py dev --quicktest
    render color image in shell terminal &
    plot some scientific functions as well



  >>> from asciiporn import *

  >>> print( img2txt("filename") )
    display color image from gif, jpg, bmp, ... to screen.
    only works if u have Python Imaging Library installed

  >>> help(img2txt.load)
    display img2txt options



  >>> plot(ft = lambda t: cos(t), tmin = 0, tmax = 16)
    plot cos(t) for t = [0, 16]

  >>> plot(ft = [cos, sin], tmin = 0, tmax = 16)
    plot 2 functions, cos & sin

  >>> plot( y = [1.5, 2.5, 3.5], t = [0, 1, 2] )
    plot datapoints (y, t) = (1.5, 0), (2.5, 1), (3.5, 2)

  >>> f = lambda t, z: sin( t*(2*pi + z) ) * (0.5 + z) - z
  >>> plot3d(ftz = ftz, tmin = 0, tmax = 16, zmin = 0, zmax = 1)
    plot f in 3d using specified ranges for t & z

  >>> help(plot.__call__)
  >>> help(dataZYT.__new__)
    display plot options



  >>> fitpoly.test()
    test asciiporn's polynomial fitting routine
    peruse fitpoly.test in asciiporn/main.py for usage

  >>> fft2d.test()
    test asciiporn's cosine fitting routine
    peruse fft2d.test in asciiporn/main.py for usage

################################################################################
RECENT CHANGELOG:
20090407
  fixed installation bugs
  added retro-gif feature
20090328
  removed py3to2 requirement
  update documentation
20090103
  rewrote 3d plotter
  fixed more 64bit issues
20081123
  fixed bug where 64bit gets truncated to 32 on 32bit machine
  256 color support
20081119
  fixed bugs in setup.py
 
File Type Py Version Uploaded on Size # downloads
asciiporn-2009.04.15.tar.gz (md5) Source 2009-05-10 681KB 318