0
import tempfile
import shutil
tmp_f = tempfile.NamedTemporaryFile(delete=False)
tmp_f.write("hello world")
shutil.copy(tmp_f.name, "/etc/exports")
Lorsque je lis "/ etc/exports", il s'agit d'un fichier complètement vide. Qu'est-ce qui ne va pas?shutil copie un fichier temporaire pour en remplacer un autre