-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreadme
More file actions
66 lines (54 loc) · 2.79 KB
/
readme
File metadata and controls
66 lines (54 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Здесь показаны три примера для работы с библиотекой curses в python 3.5
Приер 1: curses_example_1
Показывает способ отображения нажатого символа на экране.
|------------------------------|
| Press any key: |
| Key:o des:111 |
| |
| Press "q" for quit |
| |
|------------------------------|
Приер 2: curses_example_2
Показывает пример циклического меню и способ отключения отображения курсора.
|-----------------------------------|
| Menu: |
| Brown bear |
| Polar bear |
| Asian black bear |
| American black bear |
| Sun bear |
| Sloth bear |
| Spectacled bear |
| Giant panda |
| |
| |
| |
| |
| Press "enter" get description |
| Press "q" for quit |
| |
|-----------------------------------|
Приер 3: curses_example_3
Показывает примеры изменения атрибута текста(толщина, выделенность и т.д.),
способ не блокированного ввода при циклическом отображения.
|-------------------------------------------------|
| Text: |
| The spectacle before us was indeed sublime |
| Select text Attribute: |
| A_BLINK enter key: 1 |
| A_BOLD enter key: 2 |
| A_DIM enter key: 3 |
| A_REVERSE enter key: 4 |
| A_STANDOUT enter key: 5 |
| A_UNDERLINE enter key: 6 |
| Press key: |
| |
| Press "q" for quit |
| Press "l" get loop menu |
|-------------------------------------------------|
Ссылки на документацию:
https://docs.python.org/3/howto/curses.html
https://docs.python.org/3/library/curses.ascii.html
http://help.ubuntu.ru/fullcircle/39/python_%D1%87_13
Еще один пример:
https://pastebin.com/EluZ3T4P