Hello, I feel ashamed, but my google-fu betrayed me again.
How do I escape filenames when using ftplib? I'd like to download it and upload on ftp again... toDown = self.ftpMaster.nlst() for fileDown in toDown: f = tmpfile() # download self.ftpMaster.retrbinary(''.join(['RETR ', fileDown]), f.write) f.seek(0) self.ftpMirror.storbinary(''.join(["STOR ", fileDown]), f, 1024) f.close() Problem is when fileDown contains special characters / spaces and so on. I hoped for some ftplib.quote(), urllib.quote() or quote_plus() is not functional either. Is there such a function in stdlib or do I have to read through specification and write it? Thank You, Almad -- http://mail.python.org/mailman/listinfo/python-list