-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenu.py
More file actions
62 lines (49 loc) · 1.45 KB
/
Copy pathMenu.py
File metadata and controls
62 lines (49 loc) · 1.45 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
import curses, os, csv
from curses import KEY_UP
from CircularDoble import CircularDoble
lista = CircularDoble()
lista = lista.getLista()
stdscr = curses.initscr()
height = 25
width = 65
pos_y = 0
pos_x = 0
window = curses.newwin(height, width, pos_y, pos_x)
window.keypad(True)
curses.start_color()
curses.noecho()
curses.curs_set(0)
window.border(0)
window.nodelay(True)
key = 0
window.addstr(9,22,'1. Play')
window.addstr(10,22,'2. Scoreboard')
window.addstr(11,22,'3. User Selection')
window.addstr(12,22,'4. Reports')
window.addstr(13,22,'5. Bulk Loading')
while key != 27:
window.timeout(-1)
opcion = window.getch()
if opcion is not -1:
key = opcion
if opcion == ord('1'):
os.system("python Snake.py")
elif opcion == ord('2'):
window.addstr(17,22,' ')
#os.system("python Scoreboard.py")
elif opcion == ord('3'):
os.system("python Usuarios.py")
elif opcion == ord('4'):
os.system("python Reportes.py")
elif opcion == ord('5'):
lista.cargamasiva()
window.addstr(17,22,'Cargado correctamente')
window.timeout(1000)
window.getch()
window.addstr(17,22,' ')
else:
window.addstr(17,22,'Invalido')
window.timeout(1000)
window.getch()
window.addstr(17,22,' ')
curses.endwin()