FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Projet_python/__init__.py at master · Cyber-code/Projet_python · GitHub
Cyber-code
Projet_python
Repository navigation
Code
Issues
Pull requests
2
(2)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Projet_python
/
__init__.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
41 lines (28 loc) · 796 Bytes
Breadcrumbs
Projet_python
/
__init__.py
Copy path
File metadata and controls
41 lines (28 loc) · 796 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
import
time
import
curses
def
main
(
stdscr
):
# disable cursor blinking
curses
.
curs_set
(
0
)
# write something on the screen
stdscr
.
addstr
(
5
,
10
,
"Hello, world!"
)
# update the screen
stdscr
.
refresh
()
# wait for 3 seconds
time
.
sleep
(
3
)
# clear the screen
stdscr
.
clear
()
while
1
:
key
=
stdscr
.
getch
()
# clear existing texts
stdscr
.
clear
()
if
key
==
curses
.
KEY_UP
:
stdscr
.
addstr
(
0
,
0
,
"You pressed Up key!"
)
elif
key
==
curses
.
KEY_DOWN
:
stdscr
.
addstr
(
0
,
0
,
"You pressed Down key!"
)
elif
key
==
curses
.
KEY_ENTER
or
key
in
[
10
,
13
]:
stdscr
.
addstr
(
0
,
0
,
"You pressed Enter."
)
else
:
break
# update screen
stdscr
.
refresh
()
curses
.
wrapper
(
main
)
Back
|
FazBrowse Home
|
New Git URL