[code.view]

[top] / python / PyMOTW / tarfile / tarfile_extract.py

     #!/usr/bin/env python
     # encoding: utf-8
     #
     # Copyright (c) 2009 Doug Hellmann All rights reserved.
     #
     """
     """
     
     __version__ = "$Id$"
     #end_pymotw_header
     
     import tarfile
     import os
     
     os.mkdir('outdir')
     t = tarfile.open('example.tar', 'r')
     t.extract('README.txt', 'outdir')
     print os.listdir('outdir')

[top] / python / PyMOTW / tarfile / tarfile_extract.py

contact | logmethods.com