示例#1
0
 def onSubmit(self):
     Form.onSubmit(self)
     localdir = self.content['Local Dir?'].get()
     portnumber = self.content['Port Number'].get()
     servername = self.content['Server Name'].get()
     filename = self.content['File Name'].get()
     if localdir:
         os.chdir(localdir)
     portnumber = int(portnumber)
     getfile.client(servername, portnumber, filename)
     showinfo('getfilegui', 'Download complete')
     if self.oneshot: Tk().quit()
 def onSubmit(self):
     Form.onSubmit(self)
     localdir   = self.content['Local Dir?'].get()
     portnumber = self.content['Port Number'].get()
     servername = self.content['Server Name'].get()
     filename   = self.content['File Name'].get()
     if localdir:
         os.chdir(localdir)
     portnumber = int(portnumber)
     getfile.client(servername, portnumber, filename)
     showinfo('getfilegui', 'Download complete')
     if self.oneshot: Tk().quit()  # else stay in last localdir
示例#3
0
 def onSubmit(self):
     Form.onSubmit(self)
     localdir = self.content["Local Dir?"].get()
     portnumber = self.content["Port Number"].get()
     servername = self.content["Server Name"].get()
     filename = self.content["File Name"].get()
     if localdir:
         os.chdir(localdir)
     portnumber = int(portnumber)
     getfile.client(servername, portnumber, filename)
     showinfo("getfilegui", "Download complete")
     if self.oneshot:
         Tk().quit()  # else stay in last localdir
示例#4
0
 def onSubmit(self):
     Form.onSubmit(self)
     localdir = self.content['Local Dir'].get()
     remotedir = self.content['Remote Dir'].get()
     servername = self.content['Server Name'].get()
     filename = self.content['File Name'].get()
     username = self.content['User Name?'].get()
     password = self.content['Password?'].get()
     userinfo = ()
     if username and password:
         userinfo = (username, password)
     if localdir:
         os.chdir(localdir)
     self.mutex.acquire()
     self.threads +=1
     self.mutex.release()
     ftpargs = (filename, servername, remotedir, userinfo)
     _thread.start_new_thread(self.transfer, ftpargs)
     showinfo(self.title, '%s of "%s" started' % (self.mode, filename))
示例#5
0
 def onSubmit(self):
     Form.onSubmit(self)
     localdir   = self.content['Local Dir'].get()
     remotedir  = self.content['Remote Dir'].get()
     servername = self.content['Server Name'].get()
     filename   = self.content['File Name'].get()
     username   = self.content['User Name?'].get()
     password   = self.content['Password?'].get()
     userinfo   = ()
     if username and password:
         userinfo = (username, password)
     if localdir:
         os.chdir(localdir)
     self.mutex.acquire()
     self.threads += 1
     self.mutex.release()
     ftpargs = (filename, servername, remotedir, userinfo)
     _thread.start_new_thread(self.transfer, ftpargs)
     showinfo(self.title, '%s of "%s" started' % (self.mode, filename))