Python 3 read() function

Chris Rebert clp at rebertia.com
Thu Dec 4 12:42:31 EST 2008


On Thu, Dec 4, 2008 at 8:57 AM, Cro <prahaai at gmail.com> wrote:
>> Do you really mean io.StringIO? I guess you want io.BytesIO() ..
>>
>> Christian
>
> Mmm... i don't know.
> I also tried :
>
> [code]
> IDLE 3.0
>>>> import io
>>>> vContent = io.BytesIO()

You do realize that the previous line is completely pointless, right?
Later you rebind vContent to the results of huge.read() without ever
having used it between that line and the above line.

Cheers,
Chris

-- 
Follow the path of the Iguana...
http://rebertia.com

>>>> huge = io.open("C:\HUGE_FILE.pcl",'r+b',0)
>>>> vContent = huge.read()
> [/code]
>
> It still waits a lot... i don't have the patience to wait for the file
> to load completely... it takes a lot!
>
> Thank you for your reply.
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list