[Zope] From Zope to FTP, without WGET

Anthony Baxter Anthony Baxter <anthony@interlink.com.au>
Thu, 05 Jul 2001 12:56:31 +1000


Have a look at python's standard ftplib module.

That module's doc string:

0 300 moveto (What are your goals for the future - things you think you should be) show
0 288 moveto (doing and things you would like to be doing. e.g. "I want to be an) show
0 276 moveto (astronaut") show
0 252 moveto (Objectives - more specific measurable things. e.g. "Master EVA skills - ) show
0 240 moveto (measure: successfully deploy 3 satelites from shuttle") show
0 216 moveto (Training/improvement - what areas do you want to improve or what t'230 Guest login ok, access restrictions apply.'
>>> ftp.retrlines('LIST') # list directory contents
total 9
drwxr-xr-x   8 root     wheel        1024 Jan  3  1994 .
drwxr-xr-x   8 root     wheel        1024 Jan  3  1994 ..
drwxr-xr-x   2 root     wheel        1024 Jan  3  1994 bin
drwxr-xr-x   2 root     wheel        1024 Jan  3  1994 etc
d-wxrwxr-x   2 ftp      wheel        1024 Sep  5 13:43 incoming
drwxr-xr-x   2 root     wheel        1024 Nov 17  1993 lib
drwxr-xr-x   6 1094     wheel        1024 Sep 13 19:07 pub
drwxr-xr-x   3 root     wheel        1024 Jan  3  1994 usr
-rw-r--r--   1 root     root          312 Aug  1  1994 welcome.msg
'226 Transfer complete.'
>>> ftp.quit()
'221 Goodbye.'
>>> 

A nice test that reveals some of the network dialogue would be:
python ftplib.py -d localhost -l -p -l
"""


>>> "Ausum" wrote
> I'd like to enable a "save to ftp site" button along with  the "save
> changes" one, in my site's dtml-documents, using authorization info
> previously gathered.
> 
> Is it possible to use Zope as an FTP client, allowing it to upload
> immediately the just rendered page to the remote FTP site, at its mirror
> place? If the case was it isn't already written the code, would you please
> point me in the right direction?  I will be happy if a Zproduct comes out of
> this purpose.
> 
> Thanks in advance,
> 
> 
> Ausum
> 
> 
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 

-- 
Anthony Baxter     <anthony@interlink.com.au>   
It's never too late to have a happy childhood.