[Tutor] file exists question

Zachary Ware zachary.ware+pytut at gmail.com
Tue Mar 10 02:51:52 CET 2015


On Mar 9, 2015 7:25 PM, "Steven D'Aprano" <steve at pearwood.info> wrote:
> What I really want is an option to open() that only
> opens a new file, and fails if the file already exists.

If I'm not mistaken, this is the 'x' open mode, added in Python 3.4 (or
maybe 3.3, I forget).

--
Zach


More information about the Tutor mailing list