[ftputil] Empty listdir in non empty directory

Mattias mb at bokesand.se
Wed May 3 22:32:44 CEST 2017


Hi
I have a problem with ftputil.
I get empty result fromlistdir.
If it matters my ftp-server runs on Windows CE 7.0 and the client running my python script runs on a raspberry pi (raspbian jessie lite)


host = ftputil.FTPHost('192.168.10.83', 'abc', '123')
names = host.listdir(host.curdir)
print (names)

returns just []

But:
# File: ftplib-example-1.py
import ftplib
ftp = ftplib.FTP("192.168.10.83")
ftp.login("abc", "123")
data = []
ftp.dir(data.append)
ftp.quit()
for line in data:
print "-", line

returns a long list like
...
- 06-08-15 19:57 64505 Elekta20150608_13_48.csv
- 06-11-15 19:31 87932 Elekta20150611_11_14.csv
- 06-16-15 18:51 78498 Elekta20150616_11_37.csv
...


Any ideas what could be wrong?

Thanks in advance
/Mattias Bokesand

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sschwarzer.net/pipermail/ftputil/attachments/20170503/74af6d50/attachment.html>


More information about the ftputil mailing list