Make a unique filesystem path, without creating the file

Oscar Benjamin oscar.j.benjamin at
Mon Feb 22 18:59:25 EST 2016

On 22 Feb 2016 22:50, "Ben Finney" <ben+python at> wrote:
> Ethan Furman <ethan at> writes:
> > On 02/14/2016 04:08 PM, Ben Finney wrote:
> >
> > > I am unconcerned with whether there is a real filesystem entry of that
> > > name; the goal entails having no filesystem activity for this. I want
> > > valid unique filesystem path, without touching the filesystem.
> >
> > This is impossible.  If you don't touch the file system you have no
> > way to know if the path is unique.
> That was unclear. Later in the same thread, I clarified that by “unique”
> I mean nothing about entries already on the filesystem. Instead it means
> “unpredictably different each time the function is called”.

What does unpredictable mean in this context? Maybe I'm reading too much
into that... What's wrong with the example I posted before?


More information about the Python-list mailing list