Browse Source

Curses

pull/109/merge
Jure Šorn 1 year ago
parent
commit
563231fa39
2 changed files with 2 additions and 2 deletions
  1. 2
      README.md
  2. 2
      index.html

2
README.md

@ -2429,7 +2429,7 @@ from curses import A_REVERSE, KEY_DOWN, KEY_UP, KEY_LEFT, KEY_RIGHT, KEY_ENTER
def main(screen):
ch, first, selected, paths = 0, 0, 0, os.listdir()
while ch != curses.ascii.ESC:
while ch not in [curses.ascii.ESC, ord('q')]:
height, width = screen.getmaxyx()
screen.erase()
for y, filename in enumerate(paths[first : first+height]):

2
index.html

@ -1991,7 +1991,7 @@ print(table)
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">main</span><span class="hljs-params">(screen)</span>:</span>
ch, first, selected, paths = <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, os.listdir()
<span class="hljs-keyword">while</span> ch != curses.ascii.ESC:
<span class="hljs-keyword">while</span> ch <span class="hljs-keyword">not</span> <span class="hljs-keyword">in</span> [curses.ascii.ESC, ord(<span class="hljs-string">'q'</span>)]:
height, width = screen.getmaxyx()
screen.erase()
<span class="hljs-keyword">for</span> y, filename <span class="hljs-keyword">in</span> enumerate(paths[first : first+height]):

Loading…
Cancel
Save