Re: Multiple FTP download using Muliti thread

2006-12-05 Thread johnny
Ok I fixed it. Needed to put in username, and password in the c.login inside while True loop. while True: host, e = tq.get() c = ftplib.FTP(host) c.connect() try: c.login() p = posixpath.basename(e) fp = open('H:/eclipse/workspac

Re: Multiple FTP download using Muliti thread

2006-12-05 Thread johnny
I am getting the following error: raise error_temp, resp error_temp: 421 Unable to set up secure anonymous FTP Here is the code: import ftplib, posixpath, threading from TaskQueue import TaskQueue def worker(tq): while True: host, e = tq.get() c = ftplib.FTP(host)

Re: Multiple FTP download using Muliti thread

2006-12-05 Thread Fredrik Lundh
johnny wrote: > It places the ftp downloaded contents on the same folder as the this > ftp python script. How do I set a diffrent download folder location? by prepending a directory name to the filename in the open(p, 'wb') call. -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple FTP download using Muliti thread

2006-12-05 Thread johnny
It places the ftp downloaded contents on the same folder as the this ftp python script. How do I set a diffrent download folder location? johnny wrote: > It works using ftp.microsoft.com. But where does it put the downloaded > files? can I specify a download folder location? > > Justin Ezequiel w

Re: Multiple FTP download using Muliti thread

2006-12-05 Thread johnny
It works using ftp.microsoft.com. But where does it put the downloaded files? can I specify a download folder location? Justin Ezequiel wrote: > johnny wrote: > > When I run the following script, with host and password and username > > changed, I get the following errors: > > raise error_temp, res

Re: Multiple FTP download using Muliti thread

2006-12-04 Thread Justin Ezequiel
johnny wrote: > When I run the following script, with host and password and username > changed, I get the following errors: > raise error_temp, resp > error_temp: 421 Unable to set up secure anonymous FTP > > Dose the host should allow 4 simultaneous login at a time? > does it work using ftp.mic

Re: Multiple FTP download using Muliti thread

2006-12-04 Thread johnny
When I run the following script, with host and password and username changed, I get the following errors: raise error_temp, resp error_temp: 421 Unable to set up secure anonymous FTP Dose the host should allow 4 simultaneous login at a time? Justin Ezequiel wrote: > import ftplib, posixpath, thre

Re: Multiple FTP download using Muliti thread

2006-12-04 Thread johnny
Where or What folder does the ftp files get downloaded to? Justin Ezequiel wrote: > import ftplib, posixpath, threading > from TaskQueue import TaskQueue > > def worker(tq): > while True: > host, e = tq.get() > > c = ftplib.FTP(host) > c.connect() > try: >

Re: Multiple FTP download using Muliti thread

2006-12-04 Thread Peter Otten
Justin Ezequiel wrote: > Fredrik Lundh wrote: >> Justin Ezequiel wrote: >> >> > from TaskQueue import TaskQueue >> >> what Python version is this ? >> >> > > oops. forgot to note... > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/475160 Also noteworthy: "This recipe was accepted fo

Re: Multiple FTP download using Muliti thread

2006-12-04 Thread Justin Ezequiel
Fredrik Lundh wrote: > Justin Ezequiel wrote: > > > from TaskQueue import TaskQueue > > what Python version is this ? > > oops. forgot to note... http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/475160 -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple FTP download using Muliti thread

2006-12-04 Thread Fredrik Lundh
Justin Ezequiel wrote: > from TaskQueue import TaskQueue what Python version is this ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple FTP download using Muliti thread

2006-12-04 Thread Justin Ezequiel
import ftplib, posixpath, threading from TaskQueue import TaskQueue def worker(tq): while True: host, e = tq.get() c = ftplib.FTP(host) c.connect() try: c.login() p = posixpath.basename(e) fp = open(p, 'wb') try:

Multiple FTP download using Muliti thread

2006-11-30 Thread johnny
I have taken a look at the code that dose one download at time, in multi threaded manner: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/465531 What I wanted to do is, make it download multiple files at the same time. I am new to python and have gone over "Dive In To Python" yesterday.