Virgil Stokes wrote:
How can I
determine if the directory is empty WITHOUT the generation of a list of
the file names
Which platform?
On Windows, I have no idea.
On Unix you can't really do this properly without access
to opendir() and readdir(), which Python doesn't currently
wrap.
Will
On 07Aug2014 18:14, Greg Ewing greg.ew...@canterbury.ac.nz wrote:
Virgil Stokes wrote:
How can I determine if the directory is empty WITHOUT the generation
of a list of the file names
Which platform?
On Windows, I have no idea.
On Unix you can't really do this properly without access
to
On 08/06/2014 03:26 PM, Ben Finney wrote:
Virgil Stokes v...@it.uu.se writes:
Suppose I have a directory C:/Test that is either empty or contains
more than 200 files, all with the same extension (e.g. *.txt). How
can I determine if the directory is empty WITHOUT the generation of a
list of
On 2014-08-07 11:27, Ben Finney wrote:
The difference in timings when serving a web-request are
noticeable (in my use-case, I had to change my algorithm and
storage structure to simplify/avoid heavily-populated
directories)
So, if the requirement is “test whether the directory is
In article c4gjqvf8cm...@mid.individual.net,
Gregory Ewing greg.ew...@canterbury.ac.nz wrote:
Virgil Stokes wrote:
How can I
determine if the directory is empty WITHOUT the generation of a list of
the file names
Which platform?
On Windows, I have no idea.
On Unix you can't
Roy Smith wrote:
In article c4gjqvf8cm...@mid.individual.net,
Gregory Ewing greg.ew...@canterbury.ac.nz wrote:
Virgil Stokes wrote:
How can I
determine if the directory is empty WITHOUT the generation of a list of
the file names
Which platform?
On Windows, I have no idea.
On
On 2014-08-07 07:54, Roy Smith wrote:
I wonder if glob.iglob('*') might help here?
My glob.iglob() uses os.listdir() behind the scenes (see glob1() in
glob.py)
-tkc
--
https://mail.python.org/mailman/listinfo/python-list
Virgil Stokes v...@it.uu.se writes:
Suppose I have a directory C:/Test that is either empty or contains
more than 200 files, all with the same extension (e.g. *.txt). How
can I determine if the directory is empty WITHOUT the generation of a
list of the file names in it (e.g. using
In article mailman.12725.1407413212.18130.python-l...@python.org,
Tim Chase python.l...@tim.thechases.com wrote:
On 2014-08-07 07:54, Roy Smith wrote:
I wonder if glob.iglob('*') might help here?
My glob.iglob() uses os.listdir() behind the scenes (see glob1() in
glob.py)
-tkc
In
On 2014-08-07 08:19, Roy Smith wrote:
My glob.iglob() uses os.listdir() behind the scenes (see glob1()
in glob.py)
-tkc
In which case, the documentation for iglob() is broken. It says:
Return an iterator which yields the same values as glob() without
actually storing them all
In mailman.12711.1407363468.18130.python-l...@python.org Virgil Stokes
v...@it.uu.se writes:
Suppose I have a directory C:/Test that is either empty or contains more
than 200 files, all with the same extension (e.g. *.txt). How can I
determine if the directory is empty WITHOUT the
In article mailman.12729.1407433146.18130.python-l...@python.org,
Tim Chase python.l...@tim.thechases.com wrote:
On 2014-08-07 08:19, Roy Smith wrote:
My glob.iglob() uses os.listdir() behind the scenes (see glob1()
in glob.py)
-tkc
In which case, the documentation for
Suppose I have a directory C:/Test that is either empty or contains more
than 200 files, all with the same extension (e.g. *.txt). How can I
determine if the directory is empty WITHOUT the generation of a list of
the file names in it (e.g. using os.listdir('C:/Test')) when it is not
empty?
Virgil Stokes v...@it.uu.se writes:
Suppose I have a directory C:/Test that is either empty or contains
more than 200 files, all with the same extension (e.g. *.txt). How
can I determine if the directory is empty WITHOUT the generation of a
list of the file names in it (e.g. using
On 2014-08-07 08:26, Ben Finney wrote:
Virgil Stokes v...@it.uu.se writes:
Suppose I have a directory C:/Test that is either empty or
contains more than 200 files, all with the same extension
(e.g. *.txt). How can I determine if the directory is empty
WITHOUT the generation of a list
On 8/6/2014 6:44 PM, Tim Chase wrote:
On 2014-08-07 08:26, Ben Finney wrote:
Virgil Stokes v...@it.uu.se writes:
Suppose I have a directory C:/Test that is either empty or
contains more than 200 files, all with the same extension
(e.g. *.txt). How can I determine if the directory is empty
Tim Chase python.l...@tim.thechases.com writes:
The difference in timings when serving a web-request are noticeable
(in my use-case, I had to change my algorithm and storage structure to
simplify/avoid heavily-populated directories)
So, if the requirement is “test whether the directory is
Ben Finney wrote:
Virgil Stokes v...@it.uu.se writes:
Suppose I have a directory C:/Test that is either empty or contains
more than 200 files, all with the same extension (e.g. *.txt). How
can I determine if the directory is empty WITHOUT the generation of a
list of the file names in
18 matches
Mail list logo