From f3d41d6c83b9704bf4b45023c4337e4f55bd7639 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 3 Oct 2024 11:58:20 +0200 Subject: [PATCH] =?UTF-8?q?=09nouveau=20fichier=C2=A0:=20creatusr.py=20=09?= =?UTF-8?q?nouveau=20fichier=C2=A0:=20users.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sio2/SISR/07-python/creatusr/creatusr.py | 10 ++++++++++ sio2/SISR/07-python/creatusr/users.txt | 3 +++ 2 files changed, 13 insertions(+) create mode 100644 sio2/SISR/07-python/creatusr/creatusr.py create mode 100644 sio2/SISR/07-python/creatusr/users.txt diff --git a/sio2/SISR/07-python/creatusr/creatusr.py b/sio2/SISR/07-python/creatusr/creatusr.py new file mode 100644 index 0000000..471ba85 --- /dev/null +++ b/sio2/SISR/07-python/creatusr/creatusr.py @@ -0,0 +1,10 @@ +#!/usr/bin/python3 + +try: + fh = open("users.txt", "r") +except: + print("Fichier inconnu") +else: + line = fh.readline() + while line: + diff --git a/sio2/SISR/07-python/creatusr/users.txt b/sio2/SISR/07-python/creatusr/users.txt new file mode 100644 index 0000000..710b2f9 --- /dev/null +++ b/sio2/SISR/07-python/creatusr/users.txt @@ -0,0 +1,3 @@ +adupont:Albert Dupont +jduroy:Jeannette Duroy +mdurand:Marcelle Durand