On Aug 13, 2:27 pm, tmallen <[EMAIL PROTECTED]> wrote: > Here's the code:http://pastebin.com/m21dfcc19 > > What could be improved? The script feels clumsy, and I have no > experience refactoring Python code. This will eventually be a GUI FTP > client. I'm mainly looking for design advice...
Well of course it could be improved, so far you've got less than 50 lines :). You're on the starting-from-scratch phase. Here's my advice: Since you're a beginner (basing on the title of the thread), and are probably doing this for educational purposes, I'd recommend you not to use the ftplib module. Doing Internet protocol implementations is lots of fun. But with Python, which has modules for most of the popular protocols, you'll probably never need to do anything like this manually. Most Internet protocols are defined by some sort of standard, usually an RFC. FTP's is RFC 959 (http:// www.ietf.org/rfc/rfc0959.txt). (This recommendation is of course directed to you in particular; in production code it would be generally better to use the ftplib module.) Sebastian -- http://mail.python.org/mailman/listinfo/python-list