[docs] Pb de d'essai du code à la section 7.2.1 Methods Of File Objects

Vincent . gooogleapps33 at gmail.com
Thu Apr 9 10:56:16 CEST 2015


Your delay in responding permit me to solve this problem:

If you write in a file:

*        f = open('workfile, 'r')*

*        print(f.read())*

it's work. So, the output fille must always printed to the screen by the
command print() and I forget it[?], by recopying this example.

Today, I fix it and I must wait until to post a little disappointment.

Regards,

Vincent

2015-04-09 4:22 GMT+02:00 Zachary Ware <zachary.ware+pydocs at gmail.com>:

> Hi Vincent,
>
> Sorry for the delay in responding.
>
> 2015-03-05 13:01 GMT-06:00 Vincent . <gooogleapps33 at gmail.com>:
> > Hello,
> >
> > When I run this code
> > f = open('workfile', 'r')
> > f.read()
> >
> > under python interpreter, it operate.
> > in a file, it doesn't work
> >
> > Please, help to fix this bug which be useful for all readers of your
> docs.
>
> I'm not sure where you found this, as I can't find it in any current
> version of the docs.  However, that code does work properly when run
> from a file, but as you're just throwing away the return value of
> 'f.read()', it *looks* like nothing happens (when running that code in
> an interactive session, the return value is printed automatically).
>
> Thanks for the report anyway!
>
> Regards,
> --
> Zach
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20150409/c7c342ef/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 362.gif
Type: image/gif
Size: 101 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/docs/attachments/20150409/c7c342ef/attachment-0001.gif>


More information about the docs mailing list