[Python-bugs-list] [ python-Bugs-434199 ] ftplib changes CRLF to LF on Windows

noreply@sourceforge.net noreply@sourceforge.net
Thu, 09 Aug 2001 15:28:21 -0700


Bugs item #434199, was opened at 2001-06-18 08:55
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=434199&group_id=5470

Category: Python Library
Group: None
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: ftplib changes CRLF to LF on Windows

Initial Comment:
Version 2.0 
Putting a file to an FTP server (NT 4.0)
seems to change the line endings from CRLF to LF only.
It does not matter if the transfer is ascii or binary.



----------------------------------------------------------------------

>Comment By: Jeremy Hylton (jhylton)
Date: 2001-08-09 15:28

Message:
Logged In: YES 
user_id=31392

Closed for lack of information


----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-06-18 11:56

Message:
Logged In: YES 
user_id=6380

Sorry, there's not enough information in this bug report to
be able to track it down.  Can you show a brief
self-contained program that demonstrates the bug?

Since ftplib doesn't open the file to be transferred, my
suspicion is that the problem is actually in your code
calling ftplib: if you used ``f = open(filename, "r")'' to
open the file that you pass to ftplib's storbinary() method,
you are opening it in text mode.  Try ``f = open(filename,
"rb")'' to open it in binary mode.

Please report back here otherwise we'll close this bug
report next week for lack of information.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=434199&group_id=5470