From: Jesse M. <j.L...@gm...> - 2008-01-17 19:16:38
|
Thanks Jeff. This will work perfectly. On Jan 17, 2008 11:06 AM, Jeff Emanuel <jem...@fr...> wrote: > This works pretty fast, but it fills the file with zeros, > not text. > > >>> import java > >>> raf=java.io.RandomAccessFile("path_to_file","rw") > >>> raf.setLength(1024*1024*10) > >>> raf.close() > > > > Jesse Millan wrote: > > All, > > > > I'm looking for an efficient way to create a large dummy file in > > jython. It'll need to be created and filled with about 10 MB of > > (arbitrary - preferably text) data all at once. Obviously using a for > > loop and calling PyFile.write("a") ten million times is a bad idea > > memory wise... any suggestions? > > > > Thanks! > > > > -Jesse > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > Jython-users mailing list > > Jyt...@li... > > https://lists.sourceforge.net/lists/listinfo/jython-users > |