summary refs log tree commit diff stats
path: root/README
blob: 7d042929317fcb82906c0ef79d2c5b66b90d3b94 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
Ranger v.1.0.4
==============

Ranger

   A keeper, guardian, or soldier who ranges over a region
   to protect the area or enforce the law.

This is the filemanager Chuck Norris the Texas Ranger would use
if he had a computer with a unix-like operating system.  (He doesn't
trust computers though and prefers to do the calculations himself.)

After all, as a professional ranger, he needs a broad overview of his
territory, and the multi-column display of ranger provides just that,
rather than restricting you to the current directory only.
You can preview the content of the selected file or directory, copy or move
files around with the VIM-like commands dd and yy, execute predefined
applications when opening a file, etc...

Everything is fully customizable and written in Python (2.6 and 3.1
compatible) using curses for the text-based user interface.


About
-----

* Author:          Roman Zimbelmann
* Email:           romanz@lavabit.com
* Website:         http://savannah.nongnu.org/projects/ranger
* Git repo:        http://git.savannah.gnu.org/cgit/ranger.git
* Version:         1.0.4


Features
--------

* Multi-column display
* Preview of the selected file/directory
* Common file operations (create/chmod/copy/delete/...)
* Quickly find files or text inside files
* VIM-like console and hotkeys
* Open files in external programs
* Mouse support
* Change the directory of your shell after exiting ranger
* Bookmarks


Dependencies
------------

* A Unix-like Operating System
* Python 2.6 or 3.1
* Python curses module  (often but not always included with Python)


Bugs and Feature Requests
-------------------------

Report bugs and feature requests on savannah:
    https://savannah.nongnu.org/bugs/?func=additem&group=ranger

Alternatively you can send an email to romanz@lavabit.com.

Please include as much relevant information as possible.
Using ranger with the --debug option will abort the program and
print tracebacks rather than a red message in the statusbar.
If this applies to you, please include such a traceback in your report.


Getting Started
---------------

If you just want to check out ranger without installing it, type

    ./ranger.py --clean

in the top directory of ranger.  By using the --clean switch, it will
leave no trace on your system whatsoever.

To properly install it, follow the instructions in the INSTALL file,
then type:

    ranger

You should see 4 columns.  The third is the directory where you are at
the moment.  To the left, there are the directories above the current
working directory, and the column on the right is a preview of the selected
file/directory.

Now use the arrow keys to navigate, press enter to open a file.

A list of commands with short descriptions can be viewed by
pressing "?" inside the program and following the instructions.
The file ranger/defaults/keys.py contains all key combinations, so that's
another place you may want to check out.


Opening Files with Ranger
-------------------------

If you use the same applications like me, you'll be able to open
files by pressing the right arrow key.  If not, you will have to
specify them in ranger/defaults/apps.py.  It's explained
in the docstrings how exactly to do that.

Once you've set up your applications, you can also use ranger to
open files from the shell:
    ranger blabla.pdf


Customizing Ranger
------------------

The file ranger/defaults/options.py contains most of the options.
apps.py defines how files are run, keys.py defines keybindings.

The files in ranger/defaults/ can be copied into ~/.ranger/ for per-user
modifications.  Colorschemes can be placed in ~/.ranger/colorschemes.

The configuration files should be self-explanatory.  If you need more
information, check out the source code.

Also, see the file HACKING for more detailed instructions on
modifying the program.


Roadmap
-------

Short term:

* A cleaner and more flexible key configuration file
* Performance improvements everywhere
* Simplification of the code

Long term:

* One stable branch that you can rely on not crashing
* A plugin system
* Separate ranger into multiple programs:
  1. One daemon running in the background for slow IO operations
  2. A file launcher (ideally an already existing one)
  3. The actual program containing unseparable parts


Tips
----

Change the directory of your parent shell when you exit ranger:

ranger() {
    command ranger $@ &&
    cd "$(grep \^\' ~/.ranger/bookmarks | cut -b3-)"
}

This can be put into your ~/.bashrc or something similar.
200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module ranger.ext.shutil_generatorized</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="ranger.html"><font color="#ffffff">ranger</font></a>.<a href="ranger.ext.html"><font color="#ffffff">ext</font></a>.shutil_generatorized</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/hut/work/ranger/ranger/ext/shutil_generatorized.py">/home/hut/work/ranger/ranger/ext/shutil_generatorized.py</a></font></td></tr></table>
    <p><tt>Utility&nbsp;functions&nbsp;for&nbsp;copying&nbsp;files&nbsp;and&nbsp;directory&nbsp;trees.<br>
&nbsp;<br>
XXX&nbsp;The&nbsp;functions&nbsp;here&nbsp;don't&nbsp;copy&nbsp;the&nbsp;resource&nbsp;fork&nbsp;or&nbsp;other&nbsp;metadata&nbsp;on&nbsp;Mac.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="fnmatch.html">fnmatch</a><br>
</td><td width="25%" valign=top><a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="stat.html">stat</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="builtins.html#EnvironmentError">builtins.EnvironmentError</a>(<a href="builtins.html#Exception">builtins.Exception</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="ranger.ext.shutil_generatorized.html#Error">Error</a>
</font></dt><dt><font face="helvetica, arial"><a href="ranger.ext.shutil_generatorized.html#SpecialFileError">SpecialFileError</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Error">class <strong>Error</strong></a>(<a href="builtins.html#EnvironmentError">builtins.EnvironmentError</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="ranger.ext.shutil_generatorized.html#Error">Error</a></dd>
<dd><a href="builtins.html#EnvironmentError">builtins.EnvironmentError</a></dd>
<dd><a href="builtins.html#Exception">builtins.Exception</a></dd>
<dd><a href="builtins.html#BaseException">builtins.BaseException</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="builtins.html#EnvironmentError">builtins.EnvironmentError</a>:<br>
<dl><dt><a name="Error-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;x.__class__.__doc__&nbsp;for&nbsp;signature</tt></dd></dl>

<dl><dt><a name="Error-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="Error-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="builtins.html#EnvironmentError">builtins.EnvironmentError</a>:<br>
<dl><dt><strong>errno</strong></dt>
<dd><tt>exception&nbsp;errno</tt></dd>
</dl>
<dl><dt><strong>filename</strong></dt>
<dd><tt>exception&nbsp;filename</tt></dd>
</dl>
<dl><dt><strong>strerror</strong></dt>
<dd><tt>exception&nbsp;strerror</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="builtins.html#EnvironmentError">builtins.EnvironmentError</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object at 0x7f327d94ac80&gt;<dd><tt>T.<a href="#Error-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="builtins.html#BaseException">builtins.BaseException</a>:<br>
<dl><dt><a name="Error-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="Error-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="Error-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="Error-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="Error-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="Error-with_traceback"><strong>with_traceback</strong></a>(...)</dt><dd><tt>Exception.<a href="#Error-with_traceback">with_traceback</a>(tb)&nbsp;--<br>
set&nbsp;self.<strong>__traceback__</strong>&nbsp;to&nbsp;tb&nbsp;and&nbsp;return&nbsp;self.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="builtins.html#BaseException">builtins.BaseException</a>:<br>
<dl><dt><strong>__cause__</strong></dt>
<dd><tt>exception&nbsp;cause</tt></dd>
</dl>
<dl><dt><strong>__context__</strong></dt>
<dd><tt>exception&nbsp;context</tt></dd>
</dl>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>__traceback__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="SpecialFileError">class <strong>SpecialFileError</strong></a>(<a href="builtins.html#EnvironmentError">builtins.EnvironmentError</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Raised&nbsp;when&nbsp;trying&nbsp;to&nbsp;do&nbsp;a&nbsp;kind&nbsp;of&nbsp;operation&nbsp;(e.g.&nbsp;copying)&nbsp;which&nbsp;is<br>
not&nbsp;supported&nbsp;on&nbsp;a&nbsp;special&nbsp;file&nbsp;(e.g.&nbsp;a&nbsp;named&nbsp;pipe)<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="ranger.ext.shutil_generatorized.html#SpecialFileError">SpecialFileError</a></dd>
<dd><a href="builtins.html#EnvironmentError">builtins.EnvironmentError</a></dd>
<dd><a href="builtins.html#Exception">builtins.Exception</a></dd>
<dd><a href="builtins.html#BaseException">builtins.BaseException</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="builtins.html#EnvironmentError">builtins.EnvironmentError</a>:<br>
<dl><dt><a name="SpecialFileError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#SpecialFileError-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;x.__class__.__doc__&nbsp;for&nbsp;signature</tt></dd></dl>

<dl><dt><a name="SpecialFileError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="SpecialFileError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#SpecialFileError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="builtins.html#EnvironmentError">builtins.EnvironmentError</a>:<br>
<dl><dt><strong>errno</strong></dt>
<dd><tt>exception&nbsp;errno</tt></dd>
</dl>
<dl><dt><strong>filename</strong></dt>
<dd><tt>exception&nbsp;filename</tt></dd>
</dl>
<dl><dt><strong>strerror</strong></dt>
<dd><tt>exception&nbsp;strerror</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="builtins.html#EnvironmentError">builtins.EnvironmentError</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object at 0x7f327d94ac80&gt;<dd><tt>T.<a href="#SpecialFileError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="builtins.html#BaseException">builtins.BaseException</a>:<br>
<dl><dt><a name="SpecialFileError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#SpecialFileError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="SpecialFileError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#SpecialFileError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="SpecialFileError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#SpecialFileError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="SpecialFileError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#SpecialFileError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="SpecialFileError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="SpecialFileError-with_traceback"><strong>with_traceback</strong></a>(...)</dt><dd><tt>Exception.<a href="#SpecialFileError-with_traceback">with_traceback</a>(tb)&nbsp;--<br>
set&nbsp;self.<strong>__traceback__</strong>&nbsp;to&nbsp;tb&nbsp;and&nbsp;return&nbsp;self.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="builtins.html#BaseException">builtins.BaseException</a>:<br>
<dl><dt><strong>__cause__</strong></dt>
<dd><tt>exception&nbsp;cause</tt></dd>
</dl>
<dl><dt><strong>__context__</strong></dt>
<dd><tt>exception&nbsp;context</tt></dd>
</dl>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>__traceback__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-copy"><strong>copy</strong></a>(src, dst)</dt><dd><tt>Copy&nbsp;data&nbsp;and&nbsp;mode&nbsp;bits&nbsp;("cp&nbsp;src&nbsp;dst").<br>
&nbsp;<br>
The&nbsp;destination&nbsp;may&nbsp;be&nbsp;a&nbsp;directory.</tt></dd></dl>
 <dl><dt><a name="-copy2"><strong>copy2</strong></a>(src, dst)</dt><dd><tt>Copy&nbsp;data&nbsp;and&nbsp;all&nbsp;stat&nbsp;info&nbsp;("cp&nbsp;-p&nbsp;src&nbsp;dst").<br>
&nbsp;<br>
The&nbsp;destination&nbsp;may&nbsp;be&nbsp;a&nbsp;directory.</tt></dd></dl>
 <dl><dt><a name="-copyfile"><strong>copyfile</strong></a>(src, dst)</dt><dd><tt>Copy&nbsp;data&nbsp;from&nbsp;src&nbsp;to&nbsp;dst</tt></dd></dl>
 <dl><dt><a name="-copyfileobj"><strong>copyfileobj</strong></a>(fsrc, fdst, length<font color="#909090">=16384</font>)</dt><dd><tt>copy&nbsp;data&nbsp;from&nbsp;file-like&nbsp;object&nbsp;fsrc&nbsp;to&nbsp;file-like&nbsp;object&nbsp;fdst</tt></dd></dl>
 <dl><dt><a name="-copymode"><strong>copymode</strong></a>(src, dst)</dt><dd><tt>Copy&nbsp;mode&nbsp;bits&nbsp;from&nbsp;src&nbsp;to&nbsp;dst</tt></dd></dl>
 <dl><dt><a name="-copystat"><strong>copystat</strong></a>(src, dst)</dt><dd><tt>Copy&nbsp;all&nbsp;stat&nbsp;info&nbsp;(mode&nbsp;bits,&nbsp;atime,&nbsp;mtime,&nbsp;flags)&nbsp;from&nbsp;src&nbsp;to&nbsp;dst</tt></dd></dl>
 <dl><dt><a name="-copytree"><strong>copytree</strong></a>(src, dst, symlinks<font color="#909090">=False</font>, ignore<font color="#909090">=None</font>)</dt><dd><tt>Recursively&nbsp;copy&nbsp;a&nbsp;directory&nbsp;tree&nbsp;using&nbsp;<a href="#-copy2">copy2</a>().<br>
&nbsp;<br>
The&nbsp;destination&nbsp;directory&nbsp;must&nbsp;not&nbsp;already&nbsp;exist.<br>
If&nbsp;exception(s)&nbsp;occur,&nbsp;an&nbsp;<a href="#Error">Error</a>&nbsp;is&nbsp;raised&nbsp;with&nbsp;a&nbsp;list&nbsp;of&nbsp;reasons.<br>
&nbsp;<br>
If&nbsp;the&nbsp;optional&nbsp;symlinks&nbsp;flag&nbsp;is&nbsp;true,&nbsp;symbolic&nbsp;links&nbsp;in&nbsp;the<br>
source&nbsp;tree&nbsp;result&nbsp;in&nbsp;symbolic&nbsp;links&nbsp;in&nbsp;the&nbsp;destination&nbsp;tree;&nbsp;if<br>
it&nbsp;is&nbsp;false,&nbsp;the&nbsp;contents&nbsp;of&nbsp;the&nbsp;files&nbsp;pointed&nbsp;to&nbsp;by&nbsp;symbolic<br>
links&nbsp;are&nbsp;copied.<br>
&nbsp;<br>
The&nbsp;optional&nbsp;ignore&nbsp;argument&nbsp;is&nbsp;a&nbsp;callable.&nbsp;If&nbsp;given,&nbsp;it<br>
is&nbsp;called&nbsp;with&nbsp;the&nbsp;`src`&nbsp;parameter,&nbsp;which&nbsp;is&nbsp;the&nbsp;directory<br>
being&nbsp;visited&nbsp;by&nbsp;<a href="#-copytree">copytree</a>(),&nbsp;and&nbsp;`names`&nbsp;which&nbsp;is&nbsp;the&nbsp;list&nbsp;of<br>
`src`&nbsp;contents,&nbsp;as&nbsp;returned&nbsp;by&nbsp;os.listdir():<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;callable(src,&nbsp;names)&nbsp;-&gt;&nbsp;ignored_names<br>
&nbsp;<br>
Since&nbsp;<a href="#-copytree">copytree</a>()&nbsp;is&nbsp;called&nbsp;recursively,&nbsp;the&nbsp;callable&nbsp;will&nbsp;be<br>
called&nbsp;once&nbsp;for&nbsp;each&nbsp;directory&nbsp;that&nbsp;is&nbsp;copied.&nbsp;It&nbsp;returns&nbsp;a<br>
list&nbsp;of&nbsp;names&nbsp;relative&nbsp;to&nbsp;the&nbsp;`src`&nbsp;directory&nbsp;that&nbsp;should<br>
not&nbsp;be&nbsp;copied.<br>
&nbsp;<br>
XXX&nbsp;Consider&nbsp;this&nbsp;example&nbsp;code&nbsp;rather&nbsp;than&nbsp;the&nbsp;ultimate&nbsp;tool.</tt></dd></dl>
 <dl><dt><a name="-move"><strong>move</strong></a>(src, dst)</dt><dd><tt>Recursively&nbsp;move&nbsp;a&nbsp;file&nbsp;or&nbsp;directory&nbsp;to&nbsp;another&nbsp;location.&nbsp;This&nbsp;is<br>
similar&nbsp;to&nbsp;the&nbsp;Unix&nbsp;"mv"&nbsp;command.<br>
&nbsp;<br>
If&nbsp;the&nbsp;destination&nbsp;is&nbsp;a&nbsp;directory&nbsp;or&nbsp;a&nbsp;symlink&nbsp;to&nbsp;a&nbsp;directory,&nbsp;the&nbsp;source<br>
is&nbsp;moved&nbsp;inside&nbsp;the&nbsp;directory.&nbsp;The&nbsp;destination&nbsp;path&nbsp;must&nbsp;not&nbsp;already<br>
exist.<br>
&nbsp;<br>
If&nbsp;the&nbsp;destination&nbsp;already&nbsp;exists&nbsp;but&nbsp;is&nbsp;not&nbsp;a&nbsp;directory,&nbsp;it&nbsp;may&nbsp;be<br>
overwritten&nbsp;depending&nbsp;on&nbsp;os.rename()&nbsp;semantics.<br>
&nbsp;<br>
If&nbsp;the&nbsp;destination&nbsp;is&nbsp;on&nbsp;our&nbsp;current&nbsp;filesystem,&nbsp;then&nbsp;rename()&nbsp;is&nbsp;used.<br>
Otherwise,&nbsp;src&nbsp;is&nbsp;copied&nbsp;to&nbsp;the&nbsp;destination&nbsp;and&nbsp;then&nbsp;removed.<br>
A&nbsp;lot&nbsp;more&nbsp;could&nbsp;be&nbsp;done&nbsp;here...&nbsp;&nbsp;A&nbsp;look&nbsp;at&nbsp;a&nbsp;mv.c&nbsp;shows&nbsp;a&nbsp;lot&nbsp;of<br>
the&nbsp;issues&nbsp;this&nbsp;implementation&nbsp;glosses&nbsp;over.</tt></dd></dl>
 <dl><dt><a name="-rmtree"><strong>rmtree</strong></a>(path, ignore_errors<font color="#909090">=False</font>, onerror<font color="#909090">=None</font>)</dt><dd><tt>Recursively&nbsp;delete&nbsp;a&nbsp;directory&nbsp;tree.<br>
&nbsp;<br>
If&nbsp;ignore_errors&nbsp;is&nbsp;set,&nbsp;errors&nbsp;are&nbsp;ignored;&nbsp;otherwise,&nbsp;if&nbsp;onerror<br>
is&nbsp;set,&nbsp;it&nbsp;is&nbsp;called&nbsp;to&nbsp;handle&nbsp;the&nbsp;error&nbsp;with&nbsp;arguments&nbsp;(func,<br>
path,&nbsp;exc_info)&nbsp;where&nbsp;func&nbsp;is&nbsp;os.listdir,&nbsp;os.remove,&nbsp;or&nbsp;os.rmdir;<br>
path&nbsp;is&nbsp;the&nbsp;argument&nbsp;to&nbsp;that&nbsp;function&nbsp;that&nbsp;caused&nbsp;it&nbsp;to&nbsp;fail;&nbsp;and<br>
exc_info&nbsp;is&nbsp;a&nbsp;tuple&nbsp;returned&nbsp;by&nbsp;sys.exc_info().&nbsp;&nbsp;If&nbsp;ignore_errors<br>
is&nbsp;false&nbsp;and&nbsp;onerror&nbsp;is&nbsp;None,&nbsp;an&nbsp;exception&nbsp;is&nbsp;raised.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>__all__</strong> = ['copyfileobj', 'copyfile', 'copymode', 'copystat', 'copy', 'copy2', 'copytree', 'move', 'rmtree', 'Error', 'SpecialFileError']</td></tr></table>
</body></html>