1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| >>> from rarfile import RarFile
>>>
>>> rar = RarFile('rar.rar')
>>> rar.namelist()
[u'anaglyphe.py', u'desktop.ini', u'Image.jpg', u'Image.png', u'Imagedecale.jpg']
>>> rar.extract('aucune_chance')
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
rar.extract('aucune_chance')
File "C:\Python27\lib\site-packages\rarfile.py", line 596, in extract
self._extract([fname], path, pwd)
File "C:\Python27\lib\site-packages\rarfile.py", line 1137, in _extract
p = custom_popen(cmd)
File "C:\Python27\lib\site-packages\rarfile.py", line 1755, in custom_popen
creationflags = creationflags)
File "C:\Python27\lib\subprocess.py", line 679, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 893, in _execute_child
startupinfo)
WindowsError: [Error 2] Le fichier spécifié est introuvable
>>> |
Partager