Python V1
This commit is contained in:
23
Sio2/SISR/30-python/creatusr.py
Executable file
23
Sio2/SISR/30-python/creatusr.py
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/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()
|
||||
|
||||
Reference in New Issue
Block a user