Fwd: Fwd: ftplib sending data out of order

2018-03-26 Thread Charles Wilt
ans that a lower level has taken over responsibilty >> for the transfer. >> >> As a consequence, "sendall" may return before the data has been >> successfully transfered; it only means that the complete data was >> accepted by the lower (network) l

Re: Fwd: ftplib sending data out of order

2017-06-30 Thread dieter
le threads: * the file object is used concurrently by different threads (and thus, the thread doing the FTP does not see the file content in order) * two threads are using the same FTP connection concurrently. It is unlikely that your case falls into such a situation. To prove that the

Re: Fwd: ftplib sending data out of order

2017-06-30 Thread Chris Angelico
On Sat, Jul 1, 2017 at 6:03 AM, The Donald wrote: > Charles , please look up the main python wiki here: > > https://REDACTED/wiliki/wiliki.cgi?python This person has been spamming this list and others, dodging bans, and generally behaving in a way that proves he is no member of the Python commun

Re: Fwd: ftplib sending data out of order

2017-06-30 Thread The Donald
Charles , please look up the main python wiki here: https://practical-scheme.net/wiliki/wiliki.cgi?python -- https://mail.python.org/mailman/listinfo/python-list

Re: Fwd: ftplib sending data out of order

2017-06-30 Thread The Donald
dude, you're totally welcome. just make sure that you vote the current wiki admins out of office. THEY'RE FIRED ! -- https://mail.python.org/mailman/listinfo/python-list

Fwd: ftplib sending data out of order

2017-06-30 Thread Charles Wilt
Hello, First off, I'm not a python guybut I use a set of python scripts created a few years ago by somebody else to transfer source between the SVN repo on my PC and an IBM i (aka AS/400) system. Recently, multiple developers, including me, have started having intermittent issues whereby the

Re: ftplib throws: IndexError: tuple index out of range

2016-02-15 Thread Peter Otten
Antoon Pardon wrote: >> PS: How did you produce the overview over the local variables? That looks >> nice. > I started from this recipe: > http://code.activestate.com/recipes/52215-get-more-information-from-tracebacks/ > made it more to my liking and turned it into a module. So that instead of >

Re: ftplib throws: IndexError: tuple index out of range

2016-02-15 Thread Peter Otten
Antoon Pardon wrote: >> It looks like the actual error is socket.timeout which is probably raised >> from somewhere inside the stdlib without args. > > I think I know what is going on. I have my own timeout mechanism at work > here, that works with signals and alarm. When the SIGALRM fires I just

Re: ftplib throws: IndexError: tuple index out of range

2016-02-14 Thread Antoon Pardon
Op 14-02-16 om 14:40 schreef Peter Otten: > > PS: How did you produce the overview over the local variables? That looks > nice. > I started from this recipe: http://code.activestate.com/recipes/52215-get-more-information-from-tracebacks/ made it more to my liking and turned it into a module.

Re: ftplib throws: IndexError: tuple index out of range

2016-02-14 Thread Antoon Pardon
Op 14-02-16 om 14:40 schreef Peter Otten: > Antoon Pardon wrote: > >> I have written a small backup program, that uses ftplib to make >> remote backups. However recentely the program starts to regularly >> raise IndexErrors, as far as I can see the problem is in socket.py

Re: ftplib throws: IndexError: tuple index out of range

2016-02-14 Thread Peter Otten
Antoon Pardon wrote: > I have written a small backup program, that uses ftplib to make > remote backups. However recentely the program starts to regularly > raise IndexErrors, as far as I can see the problem is in socket.py > Can anyone shed some light? > > Thi

Re: ftplib throws: IndexError: tuple index out of range

2016-02-14 Thread Stephane Wirtel
Hi Antoon, EINTR, is an error when there is an emited signal to your process. http://man7.org/linux/man-pages/man2/read.2.html Look for EINTR in this page On 02/14, Antoon Pardon wrote: I have written a small backup program, that uses ftplib to make remote backups. However recentely the

ftplib throws: IndexError: tuple index out of range

2016-02-14 Thread Antoon Pardon
I have written a small backup program, that uses ftplib to make remote backups. However recentely the program starts to regularly raise IndexErrors, as far as I can see the problem is in socket.py Can anyone shed some light? This is the traceback: Traceback (most recent call last): File "

Re: python3; ftplib: TypeError: Can't convert 'bytes' object to str implicitly

2014-05-14 Thread Akira Li
Antoon Pardon writes: > op 14-05-14 18:24, Akira Li schreef: >> Antoon Pardon writes: >> >>> This is the code I run (python 3.3) >>> >>> host = ... >>> user = ... >>> passwd = ... >>> >>> from ftplib import FTP >

Re: python3; ftplib: TypeError: Can't convert 'bytes' object to str implicitly

2014-05-14 Thread MRAB
On 2014-05-14 19:06, Antoon Pardon wrote: op 14-05-14 18:24, Akira Li schreef: Antoon Pardon writes: This is the code I run (python 3.3) host = ... user = ... passwd = ... from ftplib import FTP ftp = FTP(host, user, passwd) ftp.mkd(b'NewDir') ftp.rmd(b'NewDir') T

Re: python3; ftplib: TypeError: Can't convert 'bytes' object to str implicitly

2014-05-14 Thread Antoon Pardon
op 14-05-14 18:24, Akira Li schreef: > Antoon Pardon writes: > >> This is the code I run (python 3.3) >> >> host = ... >> user = ... >> passwd = ... >> >> from ftplib import FTP >> >> ftp = FTP(host, user, passwd) >> ft

Re: python3; ftplib: TypeError: Can't convert 'bytes' object to str implicitly

2014-05-14 Thread Akira Li
Antoon Pardon writes: > This is the code I run (python 3.3) > > host = ... > user = ... > passwd = ... > > from ftplib import FTP > > ftp = FTP(host, user, passwd) > ftp.mkd(b'NewDir') > ftp.rmd(b'NewDir') > > This is the traceback &

python3; ftplib: TypeError: Can't convert 'bytes' object to str implicitly

2014-05-14 Thread Antoon Pardon
This is the code I run (python 3.3) host = ... user = ... passwd = ... from ftplib import FTP ftp = FTP(host, user, passwd) ftp.mkd(b'NewDir') ftp.rmd(b'NewDir') This is the traceback Traceback (most recent call last): File "ftp-problem", line 9, in ftp.m

Re: How to catch error messages in ftplib?

2013-11-19 Thread Chris Angelico
On Tue, Nov 19, 2013 at 9:18 PM, JL wrote: > I have the following code; > > try: > session = FTP(ftp_server_ip,ftp_user,ftp_password) > file = open(filename,'rb') # file to send > session.storbinary('STOR ' + filename, file) # send the file > except Exception, errO

Re: How to catch error messages in ftplib?

2013-11-19 Thread JL
I repost the original code segment to make it more complete; from ftplib import FTP try: session = FTP(ftp_server_ip,ftp_user,ftp_password) file = open(filename,'rb') # file to send session.storbinary('STOR ' + filename, file) # send

How to catch error messages in ftplib?

2013-11-19 Thread JL
I have the following code; try: session = FTP(ftp_server_ip,ftp_user,ftp_password) file = open(filename,'rb') # file to send session.storbinary('STOR ' + filename, file) # send the file except Exception, errObj: print Exception print errObj

Re: ftplib returns EOFError

2013-08-10 Thread Dorian MJ
print "\t\tUploading file %s..." % newname try: self.ftp.storbinary("STOR %s" % newname, open(file)) except EOFError: # yep?? self.ftp.connect(self.ftpServ) # reconnecting self.ftp.login(ftpUser, ftpPass) self.ftp.storbinary("STOR %s" % newname, open(file)) print "\t\tFile %s uploaded" % newname -

ftplib: Software caused connection abort, how I solved it

2011-06-14 Thread Mad Sweeney
My program polls FTP servers at intervals for jobs to process. Its running as a service on Windows server 2000 or 2003 :-(. About 13% of times the retrbinary and less often the nlst calls would fail with "Software caused connection abort". I could find no relevant solution on the intertubes. I a

ftplib: Software caused connection abort, how I solved it

2011-06-12 Thread Mad Sweeney
My program polls FTP servers at intervals for jobs to process. Its running as a service on Windows server 2000 or 2003 :-(. About 13% of times the retrbinary and less often the nlst calls would fail with "Software caused connection abort". I could find no relevant solution on the intertubes. I a

Re: ftplib - Did the whole file get sent?

2010-10-29 Thread Lawrence D'Oliveiro
In message <4cc5d9e9$0$1661$742ec...@news.sonic.net>, John Nagle wrote: > Look at sock_close in "socketmodule.c". Note that it ignores the > return status on close, always returns None, and never raises an > exception. As the Linux manual page for "close" says: > "Not checking the return val

Re: ftplib - Did the whole file get sent?

2010-10-25 Thread John Nagle
On 10/22/2010 10:03 PM, Sean DiZazzo wrote: Hi, I have some scripts that send files via ftplib to a client's ftp site. The scripts have generally worked great for a few years. Recently, the client complained that only part of an important file made it to their server. My boss got

Re: ftplib - Did the whole file get sent?

2010-10-25 Thread sjm
On Oct 23, 2:03 am, Sean DiZazzo wrote: I follow every ftp put (STOR) with a dir command. Then if the recipient claims that they never got it (or did not get all of it), I have evidence that they did and that their byte count is the same as mine. This does not entirely guarantee that the ftp wa

Re: ftplib - Did the whole file get sent?

2010-10-25 Thread Brendan
n FTP library, just like it's possible there is a bug in any > other FTP client.  Considering how long this library has been around > (~15-20 years), and how often it is used, it is very unlikely that a > bug causing a partial transfer but showing a success has managed to > stick

Re: ftplib - Did the whole file get sent?

2010-10-23 Thread Sean DiZazzo
used, it is very unlikely that a bug causing a partial transfer but showing a success has managed to stick around for so long." Does that make sense? > > Is ftplib reliable enough to say that if an exception is not thrown, > > that the file was transferred in full? > > Python 2

Re: ftplib - Did the whole file get sent?

2010-10-22 Thread Steven D'Aprano
Can you give me a copy of the file for testing?" [...] > Is ftplib reliable enough to say that if an exception is not thrown, > that the file was transferred in full? Python 2.4 is pretty old. Have you checked the bug tracker to see if there are any reported bugs in ftplib that migh

ftplib - Did the whole file get sent?

2010-10-22 Thread Sean DiZazzo
Hi, I have some scripts that send files via ftplib to a client's ftp site. The scripts have generally worked great for a few years. Recently, the client complained that only part of an important file made it to their server. My boss got this complaint and brought it to my attention. The

Re: ftplib limitations?

2010-08-28 Thread Lawrence D'Oliveiro
In message <4c78cc0d.8050...@sschwarzer.net>, Stefan Schwarzer wrote: > In message , Lawrence D'Oliveiro wrote: >> >> It might not be the fault of the FTP server. If you’re going through a >> router doing NAT, that could be where the timeout is happening. > > Good point, thanks! That may explain

Re: ftplib limitations?

2010-08-28 Thread Stefan Schwarzer
Hi Lawrence, On 2010-08-28 01:49, Lawrence D'Oliveiro wrote: >> Now it may be that the data connection, after having started >> the transfer, works as it should, but the control connection >> times out because the duration of the transfer is too long. > > It might not be the fault of the FTP serv

Re: ftplib limitations?

2010-08-27 Thread Lawrence D'Oliveiro
In message <4c74e604.6090...@sschwarzer.net>, Stefan Schwarzer wrote: > Now it may be that the data connection, after having started > the transfer, works as it should, but the control connection > times out because the duration of the transfer is too long. It might not be the fault of the FTP se

Re: ftplib limitations?

2010-08-25 Thread Stefan Schwarzer
. I tried with saving the file, but I also got this error. > but: Total COmmander CAN download the file, and ncftpget also can > download it without problem... I suppose they do the same as in my former suggestion: "catching" the error and ignoring it. ;-) After all, if I understood you

Re: ftplib limitations?

2010-08-25 Thread Stefan Schwarzer
Hi durumdara, On 2010-08-25 09:43, durumdara wrote: >> I can imagine the error message (a full traceback if >> possible) would help to say a bit more about the cause of >> the problem and maybe what to do about it. > > This was: > > Filename: "Repositories 20100824_101805 (Teljes).zip" Size: 153

Re: ftplib limitations?

2010-08-25 Thread durumdara
Hi! On aug. 25, 08:07, Stefan Schwarzer wrote: > > The file is 2 GB in size and is fully transferred, without > blocking or an error message. The status message from the > server is '226-File successfully transferred\n226 31.760 > seconds (measured here), 64.48 Mbytes per second', so this > looks

Re: ftplib limitations?

2010-08-25 Thread durumdara
Hi! > > So if I understand correctly, the script works well on > smaller files but not on the large one? Yes. 500-800 MB is ok. > 1 GB is not ok. > > > It down all of the file (100%) but the next line never reached. > > _Which_ line is never reached? The `print` statement after > the `retrbinar

Re: ftplib limitations?

2010-08-24 Thread Stefan Schwarzer
everytime. > > So if I understand correctly, the script works well on > smaller files but not on the large one? I just did an experiment in the interpreter which corresponds to this script: import ftplib of = open("large_file", "wb") def callback(data): o

Re: ftplib limitations?

2010-08-24 Thread Stefan Schwarzer
Hi durumdara, On 2010-08-24 11:21, durumdara wrote: > def CallBack(Data): > d['size'] = d['size'] + len(Data) > d['buffer'].append(Data) > percent = (d['size'] / float(fsize)) * 100 > percentp10 = int(percent/10) > if percentp10 > d['lastpercentp10']: >

ftplib limitations?

2010-08-24 Thread durumdara
Hi! See this code: import os, sys, ftplib from ftplib import FTP ftp = FTP() ftp.connect('ftp.anything.hu', 2121) ftp.login('?', '?') print ftp.getwelcome() ftp.set_pasv(False) ls = ftp.nlst() for s in ls: print "\nFilename:&q

Re: Using Unicode file names with ftplib and encodings.idna as a workaround?

2010-06-22 Thread Gabriel Genellina
En Tue, 22 Jun 2010 11:43:34 -0300, escribió: Python 2.6.5 (Win32): Is there a work around for ftplib's (and ftputil's) apparent inability to support Unicode file names? I'm thinking that I might be able to use the encodings.idna as a work around for this? According to RFC 2640, you should u

Using Unicode file names with ftplib and encodings.idna as a workaround?

2010-06-22 Thread python
Python 2.6.5 (Win32): Is there a work around for ftplib's (and ftputil's) apparent inability to support Unicode file names? I'm thinking that I might be able to use the encodings.idna as a work around for this? In other words, regardless of whether I'm getting or putting a file to the server, I w

Re: Delete files from FTP Server older then 7 days. Using ftputil and ftplib.

2010-05-19 Thread Giampaolo Rodolà
t find the path specified: '/test123/*.*' Probably > someone can help me further? Thank you in advance! > > import os, time, ftputil > from ftplib import FTP > > ftp = FTP('127.0.0.1') > print "Automated FTP Maintainance" > print 'Logging in.

Re: Delete files from FTP Server older then 7 days. Using ftputil and ftplib.

2010-05-19 Thread MRAB
: '/test123/*.*' Probably someone can help me further? Thank you in advance! import os, time, ftputil from ftplib import FTP ftp = FTP('127.0.0.1') print "Automated FTP Maintainance" print 'Logging in.' ftp.login('admin', 'admin') # This is the

Delete files from FTP Server older then 7 days. Using ftputil and ftplib.

2010-05-19 Thread pilgrim773
; Probably someone can help me further? Thank you in advance! import os, time, ftputil from ftplib import FTP ftp = FTP('127.0.0.1') print "Automated FTP Maintainance" print 'Logging in.' ftp.login('admin', 'admin') # This is the directory th

Re: Trouble with ftplib uploading to an FTP server

2010-02-25 Thread Sky Larking
On Feb 25, 1:10 am, Dennis Lee Bieber wrote: > On Wed, 24 Feb 2010 17:21:58 -0800 (PST), Sky Larking > declaimed the following in > gmane.comp.python.general: > > > For instance I just ran the script and os.rename() renamed it to: > > > TestMachine.local @ 02-24-2010 2020.txt > > > in that .txt f

Re: Trouble with ftplib uploading to an FTP server

2010-02-24 Thread Sky Larking
; > with a time stamp in /Users/admin/Documents) , but when the file is > > opened on the server after it's FTP'ed , it's blankI think my > > issue is something with the way I am utilizing the ftplib commands... > > I am pretty sure instead of FTPing the file, it&#x

Re: Trouble with ftplib uploading to an FTP server

2010-02-24 Thread MRAB
on the server after it's FTP'ed , it's blankI think my issue is something with the way I am utilizing the ftplib commands... I am pretty sure instead of FTPing the file, it's just creating a new one with the same name and uploading that? This script is running on some O

Trouble with ftplib uploading to an FTP server

2010-02-24 Thread Sky Larking
it's FTP'ed , it's blankI think my issue is something with the way I am utilizing the ftplib commands... I am pretty sure instead of FTPing the file, it's just creating a new one with the same name and uploading that? This script is running on some OS X 10.5 clients and

Re: Python 2.6 ftplib has timeout parameter, but how to detect a timeout

2009-12-30 Thread Giampaolo Rodola'
nt does not limit FTP transfers.  To impose a > time limit on FTP transfers, try using the timelimited function from > this recipe: > >  <http://code.activestate.com/recipes/576780/> > > /Jean > > On Dec 14, 11:08 am, Brendan wrote: > > > > > I was quite happ

Re: Python 2.6 ftplib has timeout parameter, but how to detect a timeout

2009-12-30 Thread MrJean1
, try using the timelimited function from this recipe: <http://code.activestate.com/recipes/576780/> /Jean On Dec 14, 11:08 am, Brendan wrote: > I was quite happy to see that ftplib in Python 2.6 now has a timeout > parameter. With large file downloads my script would often hang,

Re: Python 2.6 ftplib has timeout parameter, but how to detect a timeout

2009-12-30 Thread Giampaolo Rodola'
On 14 Dic, 20:08, Brendan wrote: > I was quite happy to see that ftplib in Python 2.6 now has a timeout > parameter. With large file downloads my script would often hang, > presumably from timing out. Now that there is a timeout parameter, how > would I detect when a timeout occurs?

Re: Python 2.6 ftplib has timeout parameter, but how to detect a timeout

2009-12-29 Thread Aahz
In article , Brendan wrote: > >I was quite happy to see that ftplib in Python 2.6 now has a timeout >parameter. With large file downloads my script would often hang, >presumably from timing out. Now that there is a timeout parameter, how >would I detect when a timeout occurs? Wit

Re: ftplib timeout in Python 2.4

2009-12-18 Thread Nico Grubert
Try the timelimited function from this recipe Works perfect! Thanks a lot, Jean! -- http://mail.python.org/mailman/listinfo/python-list

Re: ftplib timeout in Python 2.4

2009-12-17 Thread r0g
Nico Grubert wrote: >> I don't know of one so you may need a workaround. What platforms do you >> need to support? > > Suse Linux Enterprise 10, 64 Bit with Python 2.4.4. > I need the Python 2.4.4 for a running application Server (Zope). OK, then one approach would be to use signals.alarm(timeo

Re: ftplib timeout in Python 2.4

2009-12-17 Thread Nico Grubert
I don't know of one so you may need a workaround. What platforms do you > need to support? Suse Linux Enterprise 10, 64 Bit with Python 2.4.4. I need the Python 2.4.4 for a running application Server (Zope). -- http://mail.python.org/mailman/listinfo/python-list

Re: ftplib timeout in Python 2.4

2009-12-17 Thread r0g
Nico Grubert wrote: > Hi there, > > The ftplib has a timeout parameter in Python 2.6 and above. > Is there a way to set a timeout in Python 2.4? > > Regards > Nico I don't know of one so you may need a workaround. What platforms do you need to support? Roger.

ftplib timeout in Python 2.4

2009-12-17 Thread Nico Grubert
Hi there, The ftplib has a timeout parameter in Python 2.6 and above. Is there a way to set a timeout in Python 2.4? Regards Nico -- http://mail.python.org/mailman/listinfo/python-list

Re: ftplib retrlines timeout

2009-12-16 Thread BJ Swope
If it works like I've seen other python based network apps that have app timeouts, and Brandon's post seemed to indicate that his timed out during the readline portion of the FTP transfer. Auburn fans are like slinkys... not really good for anything but they still bring a smile to your face

Re: ftplib retrlines timeout

2009-12-16 Thread Jennifer
So you mean ftplib.FTP('.xxx.com',username,password,timeout) will timeout the retrlines as well, correct? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: ftplib retrlines timeout

2009-12-16 Thread BJ Swope
I've had experiences with some python mail servers that time out connections if data from the socket is not sent to the application within the timeout parameter. I have seen a python app on FreeBSD that would timeout a connection after 600 seconds if freebsd did not receive at least 32 kb of data

Re: ftplib retrlines timeout

2009-12-16 Thread Brendan
On Dec 15, 6:17 pm, Jennifer wrote: > I am writing a program that has a requirement for  a timeout of > retrlines after the connection established. I just wonder if timeout > of ftplib.FTP('.xxx.com',username,password,timeout) will work for > retrlines method after the connection established.

ftplib retrlines timeout

2009-12-15 Thread Jennifer
I am writing a program that has a requirement for a timeout of retrlines after the connection established. I just wonder if timeout of ftplib.FTP('.xxx.com',username,password,timeout) will work for retrlines method after the connection established. Or socket.setdefaulttimeout will work in this

Python 2.6 ftplib has timeout parameter, but how to detect a timeout

2009-12-14 Thread Brendan
I was quite happy to see that ftplib in Python 2.6 now has a timeout parameter. With large file downloads my script would often hang, presumably from timing out. Now that there is a timeout parameter, how would I detect when a timeout occurs? -- http://mail.python.org/mailman/listinfo/python-list

Re: ftplib connection fails with multiple nics

2009-10-20 Thread Sean DiZazzo
On Oct 19, 10:23 pm, Tim Roberts wrote: > Sean DiZazzo wrote: > > >I'm trying to connect to an ftp site from a windows machine with two > >nics going to two different networks, but I keep getting the below > >exception: > > >Traceback (most recent call last): > >  File "ftp.pyo", line 70, in conn

Re: ftplib connection fails with multiple nics

2009-10-20 Thread Sean DiZazzo
On Oct 19, 10:23 pm, Tim Roberts wrote: > Sean DiZazzo wrote: > > >I'm trying to connect to an ftp site from a windows machine with two > >nics going to two different networks, but I keep getting the below > >exception: > > >Traceback (most recent call last): > >  File "ftp.pyo", line 70, in conn

Re: ftplib connection fails with multiple nics

2009-10-19 Thread Tim Roberts
Sean DiZazzo wrote: > >I'm trying to connect to an ftp site from a windows machine with two >nics going to two different networks, but I keep getting the below >exception: > >Traceback (most recent call last): > File "ftp.pyo", line 70, in connect > File "ftp.pyo", line 17, in __init__ > File "

Re: ftplib connection fails with multiple nics

2009-10-19 Thread Shantanu Joshi
Sean DiZazzo writes: > On Oct 16, 4:51 pm, Sean DiZazzo wrote: >> Hi all, >> >> I'm trying to connect to an ftp site from a windows machine with two >> nics going to two different networks, but I keep getting the below >> exception: >> >> Traceback (most recent call last): >>   File "ftp.pyo", l

Re: ftplib connection fails with multiple nics

2009-10-17 Thread Sean DiZazzo
On Oct 16, 4:51 pm, Sean DiZazzo wrote: > Hi all, > > I'm trying to connect to an ftp site from a windows machine with two > nics going to two different networks, but I keep getting the below > exception: > > Traceback (most recent call last): >   File "ftp.pyo", line 70, in connect >   File "ftp.

ftplib connection fails with multiple nics

2009-10-16 Thread Sean DiZazzo
Hi all, I'm trying to connect to an ftp site from a windows machine with two nics going to two different networks, but I keep getting the below exception: Traceback (most recent call last): File "ftp.pyo", line 70, in connect File "ftp.pyo", line 17, in __init__ File "ftplib.pyo", line 131,

Re: Get error message from FTPLib

2009-09-23 Thread Jeff McNeil
On Sep 23, 1:46 pm, Bakes wrote: > I am using ftplib for a project, using a try/except loop. > > I would like to find out the exception, but I am a python newbie and > do not know how. > > How, in a try/except loop would I find the ftplib exception? For a bit on exception h

Get error message from FTPLib

2009-09-23 Thread Bakes
I am using ftplib for a project, using a try/except loop. I would like to find out the exception, but I am a python newbie and do not know how. How, in a try/except loop would I find the ftplib exception? -- http://mail.python.org/mailman/listinfo/python-list

Re: Odd/Weird errors with FTPLib

2009-09-14 Thread Bakes
On Sep 15, 1:32 am, MRAB wrote: > Bakes wrote: > > On Sep 13, 11:47 pm, MRAB wrote: > >> Bakes wrote: > >>> On 13 Sep, 22:41, Chris Rebert wrote: > On Sun, Sep 13, 2009 at 2:34 PM, Bakes wrote: > > I am using a simple python script to download my logfiles. This is on > > a while lo

Re: Odd/Weird errors with FTPLib

2009-09-14 Thread MRAB
Bakes wrote: On Sep 13, 11:47 pm, MRAB wrote: Bakes wrote: On 13 Sep, 22:41, Chris Rebert wrote: On Sun, Sep 13, 2009 at 2:34 PM, Bakes wrote: I am using a simple python script to download my logfiles. This is on a while loop, the logfile grows rapidly, so it is necessary for python to sta

Re: Odd/Weird errors with FTPLib

2009-09-14 Thread Bakes
On Sep 13, 11:47 pm, MRAB wrote: > Bakes wrote: > > On 13 Sep, 22:41, Chris Rebert wrote: > >> On Sun, Sep 13, 2009 at 2:34 PM, Bakes wrote: > >>> I am using a simple python script to download my logfiles. This is on > >>> a while loop, the logfile grows rapidly, so it is necessary for python >

Re: Odd/Weird errors with FTPLib

2009-09-13 Thread MRAB
Bakes wrote: On 13 Sep, 22:41, Chris Rebert wrote: On Sun, Sep 13, 2009 at 2:34 PM, Bakes wrote: I am using a simple python script to download my logfiles. This is on a while loop, the logfile grows rapidly, so it is necessary for python to start downloading the new script as soon as it has f

Re: Odd/Weird errors with FTPLib

2009-09-13 Thread Bakes
On 13 Sep, 22:41, Chris Rebert wrote: > On Sun, Sep 13, 2009 at 2:34 PM, Bakes wrote: > > I am using a simple python script to download my logfiles. This is on > > a while loop, the logfile grows rapidly, so it is necessary for python > > to start downloading the new script as soon as it has fini

Re: Odd/Weird errors with FTPLib

2009-09-13 Thread Chris Rebert
On Sun, Sep 13, 2009 at 2:34 PM, Bakes wrote: > I am using a simple python script to download my logfiles. This is on > a while loop, the logfile grows rapidly, so it is necessary for python > to start downloading the new script as soon as it has finished the > old. > > It works fine (for about 20

Odd/Weird errors with FTPLib

2009-09-13 Thread Bakes
I am using a simple python script to download my logfiles. This is on a while loop, the logfile grows rapidly, so it is necessary for python to start downloading the new script as soon as it has finished the old. It works fine (for about 20 minutes), then crashes. I have removed a couple of except

Re: Using a Callback Function - ftplib

2009-08-19 Thread seldan24
On Aug 18, 6:02 am, Nitebirdz wrote: > On Mon, Aug 17, 2009 at 11:10:25AM -0700, seldan24 wrote: > > > I didn't even notice the higher level methods.  I changed the > > retrieval line to: > > > ftp.nlst("testfile*.txt") > > > This works great.  The result is even captured in an array.  I really >

Re: Using a Callback Function - ftplib

2009-08-19 Thread nitebirdz
On Mon, Aug 17, 2009 at 11:10:25AM -0700, seldan24 wrote: > > I didn't even notice the higher level methods. I changed the > retrieval line to: > > ftp.nlst("testfile*.txt") > > This works great. The result is even captured in an array. I really > have no idea what the difference between a LI

Re: Using a Callback Function - ftplib

2009-08-18 Thread Nitebirdz
On Mon, Aug 17, 2009 at 11:10:25AM -0700, seldan24 wrote: > > I didn't even notice the higher level methods. I changed the > retrieval line to: > > ftp.nlst("testfile*.txt") > > This works great. The result is even captured in an array. I really > have no idea what the difference between a LI

Re: Using a Callback Function - ftplib

2009-08-17 Thread seldan24
ieve a list of files, and > > store than in an array.  I.e.: > > > import ftplib > > > ftp = ftplib.FTP(server) > > ftp.login(user, pass) > > ftp.cwd(conf['testdir']) > > Why bother with retrlines? Use the provided higer level fuctions: > >

Re: Using a Callback Function - ftplib

2009-08-17 Thread David
Il Mon, 17 Aug 2009 10:43:33 -0700 (PDT), seldan24 ha scritto: > Hello, > > I'm utterly confused by something which is most likely trivial. I'm > attempting to connect to an FTP server, retrieve a list of files, and > store than in an array. I.e.: > > impo

Using a Callback Function - ftplib

2009-08-17 Thread seldan24
Hello, I'm utterly confused by something which is most likely trivial. I'm attempting to connect to an FTP server, retrieve a list of files, and store than in an array. I.e.: import ftplib ftp = ftplib.FTP(server) ftp.login(user, pass) ftp.cwd(conf['testdir'])

Re: ftplib - 226 message not received

2009-01-08 Thread Brendan
Okay, found it on my own. ftp.voidresp() is what is needed, and it does _not_ seem to be in the Python documentation for ftplib. On Jan 8, 1:58 pm, Brendan wrote: > I am trying to download a file within a very large zipfile. I need two > partial downloads of the zipfile. The first to g

ftplib - 226 message not received

2009-01-08 Thread Brendan
I am trying to download a file within a very large zipfile. I need two partial downloads of the zipfile. The first to get the file byte offset, the second to get the file itself which I then inflate. I am implementing the partial downloads as follows: con = ftp.transfercmd('RETR ' + filename, res

Re: Process with ftplib

2008-12-26 Thread nemo
On Dec 26, 10:40 pm, "Gabriel Genellina" wrote: > En Fri, 26 Dec 2008 11:07:30 -0200, nemo escribió: > > > There seems something wrong when I use multiprocessing.Process with > > ftplib, [...] > > It works well but when I using the Process module, something se

Re: Process with ftplib

2008-12-26 Thread Gabriel Genellina
En Fri, 26 Dec 2008 11:07:30 -0200, nemo escribió: There seems something wrong when I use multiprocessing.Process with ftplib, [...] It works well but when I using the Process module, something seems wrong: ftp = qftp(host, port, user, password) p = multiprocessing.Process(target = ftp.connect

Process with ftplib

2008-12-26 Thread nemo
Hi,all There seems something wrong when I use multiprocessing.Process with ftplib, My ftp class has a connection method like this: class qftp: def __init__(...): self.ftp = FTP() def connection(self): self.ftp.connect(self.addr, self.port) self.ftp.login(self.user

Re: Partial download with ftplib and retrbinary

2008-06-06 Thread Giampaolo Rodola'
ference of the data socket and manually close it. The example below starts to retrieve a file and stops when 524288 bytes have been received. Hope this could help you. import ftplib ftp = ftplib.FTP('127.0.0.1', 'user', 'password') ftp.voidcmd('TYPE I') c

Re: Partial download with ftplib and retrbinary

2008-05-24 Thread MRAB
On May 24, 11:53 am, [EMAIL PROTECTED] wrote: > I am breaking/interrupting my connection with the ftp server at > present when doing a partial download of a file. I have a callback > with retrbinary that raises an exception and ends the download. The > problem is that the server is not notified and

Partial download with ftplib and retrbinary

2008-05-24 Thread fepeacock
I am breaking/interrupting my connection with the ftp server at present when doing a partial download of a file. I have a callback with retrbinary that raises an exception and ends the download. The problem is that the server is not notified and hangs. I cannot send any further commands and need to

Re: ftplib returns EOFError

2008-05-19 Thread Francesco Bochicchio
dule None, line 28, in upload_submit >- /silva/service_views/UCLItunesUPodcast/edit/Asset/UCLItunesUTrack/upload_sub > mit> >- Line 28 > Module Products.UCLItunesUPodcast.UCLItunesUService, line 138, in > uploadViaFtp > Module ftplib, line 523, in quit > Module ftpl

ftplib returns EOFError

2008-05-19 Thread Jon Bowlas
c Module Products.FileSystemSite.FSPythonScript, line 164, in _exec Module None, line 28, in upload_submit - - Line 28 Module Products.UCLItunesUPodcast.UCLItunesUService, line 138, in uploadViaFtp Module ftplib, line 523, in quit Module ftplib, line 246, in voidcmd Module ftpl

Re: ftplib question (cannot open data connection)

2008-01-13 Thread Laszlo Nagy
as a firewall installed. So everything would be fine except one thing: I should tell ftplib which port(s) to open, and open those ports on my firewall. For example, I can open TCP ports between 5 and 6, and then tell ftplib to use ports between 5 and 6 in PORT and EPRT command

ftplib question (cannot open data connection)

2008-01-11 Thread Laszlo Nagy
the firewall completely. Here are my questions: 1. How can I instruct ftplib to use specific ports for incoming connections? (For example, ports between 55000 and 56000). 2. How it is possible that the same program works from another computer that is behind a NAT firewall? Thanks, Laszlo -- http://mail.python.org/mailman/listinfo/python-list

ftplib ssl/tls support?

2007-11-09 Thread Giampaolo Rodola'
I noticed that poplib, smtplib, httplib, imaplib and probably others include support for ssl connections. Are there future plans for ftplib ssl/tls support? -- http://mail.python.org/mailman/listinfo/python-list

Re: ftplib error- Large file

2007-06-08 Thread Facundo Batista
[EMAIL PROTECTED] wrote: > Ok. I guess that makes sense. But what about the other > questions...mainly: Why would it throw an exception even though the > file was properly transferred? Je, well, I answered the one I knew about, :) Regarding the error... es hard to say. What happens if you tr

  1   2   >