check whether directory is readable

2005-08-23 Thread eels
Hello,
how can I check whether a directory is readable or not. Are there
differences between unix and windows?
Thank you for your hints, Eels

-- 
http://mail.python.org/mailman/listinfo/python-list


ftp: get list of files

2006-02-07 Thread eels
Hello,

I want to get a listing of my files at web server with ftp. I wantn 't
download the files.
With yyy = ftp.retrlines('LIST') I get this listing at stdout, but I
need this information at variable yyy.
How can I resolve this problem?

Thank's for your hints, Thomas

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: get list of files

2006-02-07 Thread eels
Hello Fredrik,

thank's for your quick help.
Greetings Eels

Fredrik Lundh schrieb:

> "eels" wrote:
>
> > I want to get a listing of my files at web server with ftp. I wantn 't
> > download the files.
> > With yyy = ftp.retrlines('LIST') I get this listing at stdout, but I
> > need this information at variable yyy.
> > How can I resolve this problem?
>
> as mentioned in the documentation, you need to provide a callback if
> you want to collect the data from a retr operation.
>
>yyy = []
>ftp.retrlines("LIST", yyy.append)
>
> should do the trick.
> 
> (also see the dir and nlst methods)
> 
> 

-- 
http://mail.python.org/mailman/listinfo/python-list