Filling up commands.getstatusoutput's buffer

Jeff Epler jepler at unpythonic.net
Thu Jul 21 10:01:14 EDT 2005


On Wed, Jul 20, 2005 at 03:10:49PM -0700, travislspencer at gmail.com wrote:
> Hey,
> 
> Has anyone ever had commands.getstatusoutput's buffer fill up when
> executing a verbose command? [...]

How much output are you talking about?  I tried outputs as large as
about 260 megabytes without any problem. (RedHat 9, Python 2.2)

>>> len(commands.getoutput("dd if=/dev/zero bs=512 count=512000 2>/dev/null"))
262144000
>>> 512 * 512000
262144000

Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050721/2845881f/attachment.sig>


More information about the Python-list mailing list