SioTP/Sio2/SISR/30-python/creatusr.py
2022-09-28 17:50:16 +02:00

24 lines
415 B
Python
Executable File

#!/usr/bin/python3
import sys
try:
user = open("user.txt", "r")
except:
print ("Fichier utilisateur inconnu")
else:
line = user.readline ()
maligne = line.rstrip()
# print (line)
while maligne:
(login, complet) = maligne.split(":")
print (login)
print (complet)
line = user.readline()
maligne = line.rstrip()
#print (line)
user.close()