[Python-Dev] Re: os module UserDict
Dietmar Schwertberger
dietmar@schwertberger.de
Wed, 7 Mar 2001 09:44:54 +0100 (GMT)
On Wed 07 Mar, Martin v. Loewis wrote:
> > Yes, it's from me. Unfortunately a whitespace problem with me, my editor
> > and my diffutils required Guido to apply most of the patches manually...
>
> I see. What do you think about the patch included below? It also gives
> you the default argument to os.getenv, which riscosmodule does not
> have.
Yes, looks good. Thanks.
Please don't forget to replace the 'from riscosenviron import...' statement
from the riscos section at the start of os.py with an empty 'environ' as
there is no environ in riscosmodule.c:
(The following patch also fixes a bug: 'del ce' instead of 'del riscos')
=========================================================================
*diff -c Python-200:$.Python-2/1b1.Lib.os/py SCSI::SCSI4.$.AcornC_C++.Python.!Python.Lib.os/py
*** Python-200:$.Python-2/1b1.Lib.os/py Fri Mar 2 07:04:51 2001
--- SCSI::SCSI4.$.AcornC_C++.Python.!Python.Lib.os/py Wed Mar 7 08:31:33 2001
***************
*** 160,170 ****
import riscospath
path = riscospath
del riscospath
! from riscosenviron import environ
import riscos
__all__.extend(_get_exports_list(riscos))
! del ce
else:
raise ImportError, 'no os specific module found'
--- 160,170 ----
import riscospath
path = riscospath
del riscospath
! environ = {}
import riscos
__all__.extend(_get_exports_list(riscos))
! del riscos
else:
raise ImportError, 'no os specific module found'
========================================================================
If you change riscosenviron.py, would you mind replacing 'setenv' with
'putenv'? It seems '__setitem__' has never been tested...
Regards,
Dietmar