demos/demo_buffer.py
changeset 83 ebe732b9ef19
parent 82 2bead23b1262
child 84 04dfb5ddf031
equal deleted inserted replaced
82:2bead23b1262 83:ebe732b9ef19
     1 #!/usr/bin/env python3
       
     2 
       
     3 import sys
       
     4 sys.path.append('..')
       
     5 
       
     6 from tuikit.core.buffer import Buffer
       
     7 
       
     8 
       
     9 buf = Buffer(16, 8)
       
    10 buf.fill(c='#')
       
    11 buf.hline(1, 1, 14, c='-')
       
    12 buf.hline(1, 6, 14, c='-')
       
    13 buf.vline(7, 2, 4, c='|')
       
    14 buf.puts(8, 4, 'Hello!')
       
    15 buf.frame()
       
    16 
       
    17 for y in range(buf.size.h):
       
    18     for x in range(buf.size.w):
       
    19         print(buf.get(x, y)[0], end='')
       
    20     print()