<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Bitstream Vera Sans'; font-size:10pt; font-weight:400; font-style:normal;">Hi Stefan,<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>ftp.sunfreeware.com need another parser I think:<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>ftp> ls<br>
227 Entering Passive Mode (66,193,208,66,41,119)<br>
150 Opening ASCII mode data connection for /bin/ls.<br>
total 10<br>
lrwxrwxrwx 1 staff 7 Aug 13 2003 bin -> usr/bin<br>
d--x--x--x 2 staff 512 Sep 24 2000 dev<br>
d--x--x--x 3 staff 512 Sep 25 2000 etc<br>
dr-xr-xr-x 3 staff 512 Oct 3 2000 pub<br>
d--x--x--x 5 staff 512 Oct 3 2000 usr<br>
226 Transfer complete.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>conn=ftputil.FTPHost('ftp.sunfreeware.com','anonymous','pippo@pippo.com')<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>In [6]: conn<br>
Out[6]: <FtpManager.ftputil.ftputil.FTPHost object at 0x1ad3610><br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>In [7]: conn.listdir('/')<br>
---------------------------------------------------------------------------<br>
ParserError Traceback (most recent call last)<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>/home/nicola/workspace/FtpManager/<ipython console> in <module>()<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>/home/nicola/workspace/FtpManager/ftputil/ftputil.py in listdir(self, path)<br>
764 any of the available parsers raise a `ParserError`. <br>
765 """ <br>
--> 766 return self._stat.listdir(path) <br>
767 <br>
768 def lstat(self, path, _exception_for_missing_path=True): <br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>/home/nicola/workspace/FtpManager/ftputil/ftp_stat.py in listdir(self, path)<br>
533 <br>
534 def listdir(self, path): <br>
--> 535 return self.__call_with_parser_retry(self._real_listdir, path)<br>
536 <br>
537 def lstat(self, path, _exception_for_missing_path=True): <br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>/home/nicola/workspace/FtpManager/ftputil/ftp_stat.py in __call_with_parser_retry(self, method, *args, **kwargs) <br>
528 self._allow_parser_switching = False <br>
529 self._parser = MSParser()<br>
--> 530 return method(*args, **kwargs)<br>
531 else:<br>
532 raise<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>/home/nicola/workspace/FtpManager/ftputil/ftp_stat.py in _real_listdir(self, path)<br>
397 # correct timestamp values in the cache<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p> 398 stat_result = self._parser.parse_line(line,<br>
--> 399 self._host.time_shift())<br>
400 loop_path = self._path.join(path, stat_result._st_name)<br>
401 self._lstat_cache[loop_path] = stat_result<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>/home/nicola/workspace/FtpManager/ftputil/ftp_stat.py in parse_line(self, line, time_shift)<br>
327 st_size = int(dir_or_size)<br>
328 except ValueError:<br>
--> 329 raise ftp_error.ParserError("invalid size %s" % dir_or_size)<br>
330 else:<br>
331 st_size = None<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>ParserError: invalid size staff<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>do you have something already done?<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>regards<br>
Nicola<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p></body></html>