[python-chinese] ftp list 检索
LI WeiMin (SCC-Test)
weimin.li在statschippac.com
星期五 十一月 10 13:45:30 HKT 2006
请问如何判别nlst的信息哪些是文件哪些是目录??又如何判别目录是否已经是最底层
的目录?? 现在CWD到文件时会出错@@
-----Original Message-----
From: limodou [mailto:limodou at gmail.com]
Sent: Friday, November 10, 2006 8:28 AM
To: python-chinese at lists.python.cn
Subject: Re: [python-chinese] ftp list 检索
On 11/10/06, LI WeiMin (SCC-Test) <weimin.li at statschippac.com> wrote:
>
>
> Hi Python-list,
>
> 想通过FTP在FTP server
> 上检索相关文件的信息,查了下FTPlib没有对应的的OBJECT去遍历所有目录,只有
dir()与nlst()可以显示当前目录或选择对应一个目
> 录的信息,对于local的文件可以有os.walk去遍历,请问FTP上的目录遍历如何实
现??只有判断是否是一目录然后CWD进去再nlst吗?
> ?
>
> 谢谢!
>
只能是一层层遍历。
--
I like python!
UliPad <<The Python Editor>>: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou
_______________________________________________
python-chinese
Post: send python-chinese at lists.python.cn
Subscribe: send subscribe to python-chinese-request at lists.python.cn
Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese
关于邮件列表 python-chinese 的更多信息