a = random.randint(1, 9999)
name = 'filename' + str(a * 7) + '.txt'
print '>>', a
ROOT = os.path.abspath(os.sep)
filepath = os.path.join(ROOT, name)
os.chdir(filepath)
file = open(filepath, 'w')
Il montre une OSError. OSError: [Errno 2] Aucun fichier ou répertoire de ce type: '/ Users/Downloads'Comment mettre le fichier txt dans le répertoire Téléchargements (python, odoo)
pouvez-vous afficher la sortie complète du script? – aydow