[Tutor] a quick Q: how to use for loop to read a series of files with .doc end
lina
lina.lastname at gmail.com
Sat Oct 8 04:52:01 CEST 2011
<snip>
> The 'with' syntax above implicitly closes the file for you
> at the end of the block. If you use the
>
> f = open(...)
>
> style you are expected to explicitly close the file when you are finished
> with it. This is especially important when writing to a file because that
> will guarantee that the OS writes the data to the file on disk. Without a
> close its possible for your data to get held in a buffer that doesn't get
> written to disk. Rare, but possible.
>
> Thanks. BTW, are there some tricks in using gedit input code.
such as I wanna backspace, but usually won't count 4 spaces, and sometimes I
wanna more back space,
like move:
>>> a
to
>>> a
the "prompt" sign here to give a reference position of a, I am interested in
gedit, not idle here.
Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111008/9d4bad90/attachment.html>
More information about the Tutor
mailing list