<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,
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor