Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
becfcc0a
Commit
becfcc0a
authored
Aug 14, 2012
by
R David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#15269: document dircmp.left and right.
Based on patch by Chris Jerdonek.
parent
6ce21a3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
Doc/library/filecmp.rst
Doc/library/filecmp.rst
+25
-0
No files found.
Doc/library/filecmp.rst
View file @
becfcc0a
...
...
@@ -106,6 +106,16 @@ The :class:`dircmp` class
to compute are used.
.. attribute:: left
The directory *a*.
.. attribute:: right
The directory *b*.
.. attribute:: left_list
Files and subdirectories in *a*, filtered by *hide* and *ignore*.
...
...
@@ -168,3 +178,18 @@ The :class:`dircmp` class
A dictionary mapping names in :attr:`common_dirs` to :class:`dircmp` objects.
Here is a simplified example of using the ``subdirs`` attribute to search
recursively through two directories to show common different files::
>>> from filecmp import dircmp
>>> def print_diff_files(dcmp):
... for name in dcmp.diff_files:
... print "diff_file %s found in %s and %s" % (name, dcmp.left,
... dcmp.right)
... for sub_dcmp in dcmp.subdirs.values():
... print_diff_files(sub_dcmp)
...
>>> dcmp = dircmp('dir1', 'dir2')
>>> print_diff_files(dcmp)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment