[issue46220] imaplib.py "select" mailbox names containing spaces.

2022-01-01 Thread Matthew H. McKenzie
New submission from Matthew H. McKenzie : A mailbox (folder) need not be for a recipient and need not be the private part of an RFC2822 address. Passing a value of "000 Bookings" to select() results in validation issues when the tokens are parsed as arguments and there are too

[issue45746] ftplib please revisit retrlines('RETR as it produces files without newlines

2021-11-07 Thread Matthew H. McKenzie
New submission from Matthew H. McKenzie : Lib/ftplib.py function retrlines Inspired by documentation the following writes a file without line-endings: from ftplib import FTP ftp=FTP() ftp.connect('hostname') ftp.login('user','') ftp.sendcmd('pasv&#

[issue45746] ftplib please revisit retrlines('RETR as it produces files without newlines

2021-11-07 Thread Matthew H. McKenzie
Matthew H. McKenzie added the comment: On the face of it it is my mistake for using the write method for my file. But read on. your write_line() adds an EOL, OK, because it wraps print(). So the retrlines() function strips them in anticipation? The error is arguably in my own code as I

[issue45746] ftplib please revisit retrlines('RETR as it produces files without newlines

2021-11-07 Thread Matthew H. McKenzie
Matthew H. McKenzie added the comment: To answer your original questions : Linux Host and Client, amd MVS (EBCDIC records) to Linux. hacks to overcome (in libftp): def print_line(line): '''Default retrlines callback to print a line.''' print(line, end