[Python-Dev] OpenVMS file system and UNIVERSAL_NEWLINES support

Jean-François Piéronne jf.pieronne at laposte.net
Fri Feb 27 06:55:41 EST 2004


Jack Jansen wrote:
> 
> On 25 Feb 2004, at 17:39, Jean-François Piéronne wrote:
> 
>>
>> Before I submit a patch, I have done the following update which seem 
>> to fix the problem, any comment are welcome.
>>
>> patch for include/fileobject.h
>> @@ -54,3 +54,7 @@
>>  */
>> +#ifdef __VMS
>> +#define PY_STDIOTEXTMODE ""
>> +#else
>>  #define PY_STDIOTEXTMODE "b"
>> +#endif
> 
> [...]
> 
> I wouldn't call it __VMS: if Python still runs on OS/390 or MVS or 
> whatever they'll have the same problem. And I/O system where the 
> underlying filesystem isn't bytestream-based is really what we're 
> talking about, I think.

Correct, none of these patches are OpenVMS specific.
Any conditional name suggestion is welcome...

Someone has also suggest to simplified
#ifdef __VMS
                /* Compatibility: specifying U in a Python without universal
                ** newlines is allowed, and the file is opened as a normal text
                ** file.
                */
                        mode = "r";
#else
                        mode = "rb";
#endif
to
         mode = "r" PY_STDIOTEXTMODE;


Thanks for your help.


Jean-François



More information about the Python-Dev mailing list