[Python-Dev] OpenVMS file system and UNIVERSAL_NEWLINES support

Jean-François Piéronne jf.pieronne at laposte.net
Mon Feb 23 12:15:07 EST 2004


Hi all,

I am one of the maintainer of Python on OpenVMS.

Building from time to time Python 2.4 from CVS snapshot, I have just noticed 
that all the conditional compilation against WITH_UNIVERSAL_NEWLINES has been 
removed.

This is a major problem on OpenVMS.

VMS has a complex file system which is mostly record oriented and not stream 
oriented (even if it support stream oriented files, this is not the default).
For example it support the following record formats: fixed-length, 
variable-length, variable with fixed-length control, 3 stream format, etc...
The default is variable-length.

So reading (opening) text file, for example during a import, in binary mode 
lead to incorrect results because there are no '\n' or any character (or 
combinaison of characters) at the end of the line.
If the file is not open in binary mode the VMS CRTL automatically append a 
'\n' at the end of the record, so all work correctly. This not the case in 
binary mode, in this case the record is read as is, in fact you even get the 
control part of the record.

So, is it possible to maintain this test, even as undocumented or is it 
acceptable to transform it into a specific VMS test. But I suspect that other 
mainframe file system will have the same problem.

Thanks for any help.

Regards,

Jean-François



More information about the Python-Dev mailing list