On Tue, Apr 22, 2008 at 7:04 PM, Steven Bethard [EMAIL PROTECTED]
wrote:
The callable takes the src directory + its content as a list, and
returns filter eligible for exclusion
FWIW, that looks better to me.
That makes me wonder, like Alexander said on the bug tracker:
In the
On Mon, Apr 21, 2008 at 2:25 AM, Steven Bethard
[EMAIL PROTECTED] wrote:
On Sun, Apr 20, 2008 at 4:15 PM, Tarek Ziadé [EMAIL PROTECTED] wrote:
I have submitted a patch for review here: http://bugs.python.org/issue2663
glob-style patterns or a callable (for complex cases) can be
On Tue, Apr 22, 2008 at 1:56 AM, Tarek Ziadé [EMAIL PROTECTED] wrote:
On Mon, Apr 21, 2008 at 2:25 AM, Steven Bethard [EMAIL PROTECTED] wrote:
On Sun, Apr 20, 2008 at 4:15 PM, Tarek Ziadé [EMAIL PROTECTED] wrote:
I have submitted a patch for review here:
http://bugs.python.org/issue2663
The pattern matching uses the src_dir to call glob.glob(), which returns
the list of files to be excluded. That's why I added within the
copytree() function.
To make an excluding_patterns work, it could be coded like this::
def excluding_patterns(*patterns):
def
Steven Bethard wrote:
I'm not a big fan of the sequence-or-callable argument. Why not just
make it a callable argument, and supply a utility function
Or have two different keyword arguments, one for a sequence
and one for a callable.
--
Greg
___
On Sun, 20 Apr 2008, Steven Bethard wrote:
On Sun, Apr 20, 2008 at 4:15 PM, Tarek Ziadé [EMAIL PROTECTED] wrote:
I have submitted a patch for review here: http://bugs.python.org/issue2663
glob-style patterns or a callable (for complex cases) can be provided
to filter out files or
- copying a source to a target, but the pyc/pyo file
def filtering(source, target):
return os.path.splitext(filename) not in ('.pyc', '.pyo')
shutil.copytree(source, target, filter_=filtering)
-
oups, made a mistake in my example:
def
On Thu, Apr 17, 2008 at 7:06 PM, Guido van Rossum [EMAIL PROTECTED] wrote:
Sounds like a neat little feature. Looking forward to it. Maybe the
most useful use case would be to provide glob-style patterns for
skipping files or directories (and their contents).
Alright I will work on it that