Newsgroups: comp.lang.python
From: andrea crotti <andrea.crott...@gmail.com>
Date: Fri, 9 Nov 2012 10:39:21 +0000
Local: Fri, Nov 9 2012 5:39 am
Subject: Re: creating size-limited tar files
Anyway in the meanwhile I implemented this tar and split in this way below.
It works very well and it's probably much faster, but the downside is that I give away control to tar and split.. def tar_and_split(inputfile, output, bytes_size=None):
out = '-' if bytes_size else (output + '.tar.gz')
logger.info("Running command %s" % cmd)
proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
logger.info("Output %s" % out)
if proc.returncode != 0:
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||