20 lines
420 B
Python
20 lines
420 B
Python
#!/usr/bin/python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from curses import color_pair as get_pair
|
|
|
|
def main (line, screen):
|
|
from os import popen
|
|
screen.addstr (line, 0, '-->', get_pair (5))
|
|
screen.addstr (line, 3, 'Utilisateurs', get_pair (1))
|
|
line += 1
|
|
|
|
w = popen ('w')
|
|
users = []
|
|
for i in w:
|
|
users.append (i)
|
|
for i in range (1, len (users)):
|
|
screen.addstr (line, 0, users [i], get_pair (1))
|
|
line += 1
|
|
|
|
return (line) |