GUI Download Manager

Post here if you need help with creating a Graphical User Interface in Python.

GUI Download Manager

Postby precyoz » Mon Jan 06, 2014 3:28 am

I have here a script from Kika which is a gript that connect to an ftp site (when you run the Kika program it will show a log in window and when you click connect it will state that you're successfully log in and nothing follows.)What should I add in this script so that every time I run the script and successfully connect to the ftp site using your username or password or an anonymous connection another window will appear(log in window will automatically disappear) which contains your ftp site and all the files. Then you will be given an option if you want to download everything or just download the newest files. Thanks!

Code: Select all
class NewDl(wx.Frame):
    def __init__(self, *args, **kw):
        super(NewDl, self).__init__(*args, **kw)
        loc = wx.IconLocation(r'C:\Python27\favicon.ico', 0)
    def InitUI(self):   
        wx.StaticText(self, label='FTP site:', pos=(60, 40))
        wx.StaticText(self, label='Username:', pos=(60, 85))
        wx.StaticText(self, label='Password:', pos=(60, 130))
        self.ftpsite = wx.TextCtrl(self, pos=(160, 30),
            size=(160, -1))
        self.username = wx.TextCtrl(self,  pos=(160, 75),
            size=(160, -1))
        self.password = wx.TextCtrl(self, pos=(160, 125),
            size=(160, -1), style=wx.TE_PASSWORD)
        self.ftp = None
        con = wx.Button(self, label='Connect', pos=(160, 220))
        self.Bind(wx.EVT_BUTTON, self.OnConnect, con)
        self.Bind(wx.EVT_MAXIMIZE, self.OnMaximize)
        self.Bind(wx.EVT_SHOW, self.OnShown)
 = NewDownload(self)
        self.SetSize((400, 350))
        self.SetTitle('SeA - HABS')
    def OnShown(self, e):
    def OnMaximize(self, e):
    def OnConnect(self, e):
        if not self.ftp:
            ftpsite = self.ftpsite.GetValue()
            username = self.username.GetValue()
            password = self.password.GetValue()
                self.ftp = FTP(ftpsite)
                var = self.ftp.login(username, password)
      'Successfully Login!')
            except AttributeError:
                self.ftp = None
            except all_errors, err:
                self.ftp = None
Posts: 18
Joined: Wed Jul 03, 2013 6:23 am

Return to GUI

Who is online

Users browsing this forum: Bing [Bot] and 1 guest