If I remember, Python 3.0 gas byte as a data type where you can play with bytes. Otherwise you can open file with read and binary mode
rf = open("README.txt", "rb") bytes = f.read(n) # n bytes or simply read() but it returns string wf = open("README.txt", "wb") wf.write(bytes) #technically string OR have a look at http://docs.python.org/library/shutil.html which has many copy utilities which you need..very simple.. -- Krish, http://stacked.in On Thu, Jul 8, 2010 at 1:24 AM, Noufal Ibrahim <nou...@gmail.com> wrote: > Rahul R <rahul8...@gmail.com> writes: > > > i was wondering if there is a way to fetch the raw data of any file i > > input for example if i accept a text file or a video file (particualr > > large video files ). i could fetch the the equivalent bits and store > > it in another file > > [...] > > I'm not sure what you want to do. What do you mean by the following > terms > - fetch (as in "fetch the raw data") > - raw data > - accept (as in "accept a text file") > - equivalent (as in "equivalent bits") > - store (as in "store it in another file") > > IF you're looking to make copies, it's simple enough. Just read from one > (source) and write into the other (destination). > > > -- > _______________________________________________ > BangPypers mailing list > BangPypers@python.org > http://mail.python.org/mailman/listinfo/bangpypers > _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers