Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.

Paste

Pasted as Python by musashi ( 15 years ago )
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import tarfile
import progressbar
import ConfigParser

#config
config = ConfigParser.ConfigParser()
config.read('config.conf')
infile = config.get('in','infile')
outfile= config.get('out','outfile')

#tar, progressbar

tar = tarfile.open(outfile,"w|gz")
tar.add(infile)
tar.close()

bar = progressbar.ProgressBar(widgets=['Архивация файла: ',
                  progressbar.Bar(left='[', marker='=', right='] '),
                  progressbar.Percentage()]).start()

tar = tarfile.open(outfile,"w|gz")
tar.add(infile)
tar.close()

bar.finish()

 

Revise this Paste

Your Name: Code Language: