| 1 |
ftputil |
|---|
| 2 |
======= |
|---|
| 3 |
|
|---|
| 4 |
Purpose |
|---|
| 5 |
------- |
|---|
| 6 |
|
|---|
| 7 |
ftputil is a high-level FTP client library for the Python programming |
|---|
| 8 |
language. ftputil implements a virtual file system for accessing FTP |
|---|
| 9 |
servers, that is, it can generate file-like objects for remote files. |
|---|
| 10 |
The library supports many functions similar to those in the os, |
|---|
| 11 |
os.path and shutil modules. ftputil has convenience functions for |
|---|
| 12 |
conditional uploads and downloads, and handles FTP clients and servers |
|---|
| 13 |
in different timezones. |
|---|
| 14 |
|
|---|
| 15 |
What's new? |
|---|
| 16 |
----------- |
|---|
| 17 |
|
|---|
| 18 |
ftputil 2.4b adds a ``chmod`` method to the ``FTPHost`` class, similar |
|---|
| 19 |
to ``os.chmod``. |
|---|
| 20 |
|
|---|
| 21 |
Using the ``xreadlines`` method of FTP file objects causes a warning |
|---|
| 22 |
through Python's warnings framework. |
|---|
| 23 |
|
|---|
| 24 |
Incompatibility notice |
|---|
| 25 |
---------------------- |
|---|
| 26 |
|
|---|
| 27 |
Both the ``xreadlines`` method and the long-deprecated direct access |
|---|
| 28 |
of exceptions via the ``ftputil`` module (as in |
|---|
| 29 |
``ftputil.PermanentError``) will be removed in ftputil *2.5*. Starting |
|---|
| 30 |
with that version, exception classes will only be accessible via the |
|---|
| 31 |
``ftp_error`` module. |
|---|
| 32 |
|
|---|
| 33 |
The distribution contains a small tool find_deprecated_code.py to scan |
|---|
| 34 |
a directory for the deprecated uses. Invoke the program with the |
|---|
| 35 |
``--help`` option to see a description. |
|---|
| 36 |
|
|---|
| 37 |
Documentation |
|---|
| 38 |
------------- |
|---|
| 39 |
|
|---|
| 40 |
The documentation for ftputil can be found in the file ftputil.txt |
|---|
| 41 |
(reStructuredText format) or ftputil.html (recommended, generated |
|---|
| 42 |
from ftputil.txt). |
|---|
| 43 |
|
|---|
| 44 |
Prerequisites |
|---|
| 45 |
------------- |
|---|
| 46 |
|
|---|
| 47 |
To use ftputil, you need Python, at least version 2.3. Python is a |
|---|
| 48 |
programming language, available from http://www.python.org for free. |
|---|
| 49 |
|
|---|
| 50 |
Installation |
|---|
| 51 |
------------ |
|---|
| 52 |
|
|---|
| 53 |
- *If you have an older version of ftputil installed, delete it or move |
|---|
| 54 |
it somewhere else, so that it doesn't conflict with the new version!* |
|---|
| 55 |
|
|---|
| 56 |
- Unpack the archive file containing the distribution files. If you |
|---|
| 57 |
had an hypothetical ftputil version 1.2, you would type at the shell |
|---|
| 58 |
prompt: |
|---|
| 59 |
|
|---|
| 60 |
tar xzf ftputil-1.2.tar.gz |
|---|
| 61 |
|
|---|
| 62 |
However, if you read this, you probably unpacked the archive already. ;-) |
|---|
| 63 |
|
|---|
| 64 |
- Make the directory to where the files were unpacked your current directory. |
|---|
| 65 |
Consider that after unpacking, you have a directory ftputil-1.2. Make it |
|---|
| 66 |
the current directory with |
|---|
| 67 |
|
|---|
| 68 |
cd ftputil-1.2 |
|---|
| 69 |
|
|---|
| 70 |
- Type |
|---|
| 71 |
|
|---|
| 72 |
python setup.py install |
|---|
| 73 |
|
|---|
| 74 |
at the shell prompt. On Unix/Linux, you have to be root to perform the |
|---|
| 75 |
installation. Likewise, you have to be logged in as administrator if you |
|---|
| 76 |
install on Windows. |
|---|
| 77 |
|
|---|
| 78 |
If you want to customize the installation paths, please read |
|---|
| 79 |
http://docs.python.org/inst/inst.html . |
|---|
| 80 |
|
|---|
| 81 |
If you have easy_install installed, you can install the current |
|---|
| 82 |
version of ftputil directly from the Python Package Index (PyPI) |
|---|
| 83 |
without downloading the package explicitly. |
|---|
| 84 |
|
|---|
| 85 |
- Just type |
|---|
| 86 |
|
|---|
| 87 |
easy_install ftputil |
|---|
| 88 |
|
|---|
| 89 |
on the command line. You'll probably need root/administrator |
|---|
| 90 |
privileges to do that (see above). |
|---|
| 91 |
|
|---|
| 92 |
License |
|---|
| 93 |
------- |
|---|
| 94 |
|
|---|
| 95 |
ftputil is Open Source Software. It is distributed under the |
|---|
| 96 |
new/modified/revised BSD license (see |
|---|
| 97 |
http://www.opensource.org/licenses/bsd-license.html ). |
|---|
| 98 |
|
|---|
| 99 |
Authors |
|---|
| 100 |
------- |
|---|
| 101 |
|
|---|
| 102 |
Stefan Schwarzer <sschwarzer@sschwarzer.net> |
|---|
| 103 |
|
|---|
| 104 |
Evan Prodromou <evan@bad.dynu.ca> (lrucache module) |
|---|
| 105 |
|
|---|
| 106 |
Please provide feedback! It's surely appreciated. :-) |
|---|
| 107 |
|
|---|