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
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)
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
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
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
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
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
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:
>
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
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
Justin Ezequiel wrote:
> from TaskQueue import TaskQueue
what Python version is this ?
--
http://mail.python.org/mailman/listinfo/python-list
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:
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.
13 matches
Mail list logo