How to generate a file, of a given length, filled with random content, with Python? -


i need generate file filled random contents, , size of file should of size, no more, no less, 1000 bytes. have small piece of c code can finish task, need in python.

import os open('randomdata', 'wb') f:     f.write(os.urandom(1000)) 

Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -