Python script that generates blob files
Irmen de Jong
irmen at -nospam-remove-this-xs4all.nl
Thu Oct 7 19:12:59 EDT 2004
Sean Carey wrote:
> I am wondering if anyone knows of a python script or any other script
> that will generate random files with random sizes that I can specify.
define "random files".
If you're on Linux or similar, just use the dd utility?
Otherwise something like this (where the contents of the file
is left blank):
f=open("filename","wb")
f.seek( desiredsize-1 )
f.write('\0')
f.close()
--Irmen
More information about the Python-list
mailing list