Mar-05-2019, 09:59 AM
Hello to all of you,
I am posting this discussion because I have a problem. Indeed, I'm new to python and I'd like to get help on Threading.
I am currently developing an automation script to connect to an FTP, navigate to folders and download files.
This part is indeed finished but I would like to be able to make a thread to check for example (every 20min) if the download is going smoothly.
here is my download code:
Thank you for your help
I am posting this discussion because I have a problem. Indeed, I'm new to python and I'd like to get help on Threading.
I am currently developing an automation script to connect to an FTP, navigate to folders and download files.
This part is indeed finished but I would like to be able to make a thread to check for example (every 20min) if the download is going smoothly.
here is my download code:
class Download:
def __init__(self):
self.path="FolderFiles"
self.target=" /var/www/folder/Output"
def downloadFile(self):
for root, dirs, files in os.walk(self.path, topdown=False):
for name in files:
print(name)
rarFiles=os.path.join(root, name)
unrar = "unrar x -y "+rarFiles+self.target
os.system(unrar)
#time.sleep(10)PS: If you have other proposals other than Thread I am also listeningThank you for your help
