~ensoft-opensource/+junk/cpython

« back to all changes in this revision

Viewing changes to Lib/os.py

  • Committer: Martin Morrison
  • Date: 2013-05-08 04:00:22 UTC
  • Revision ID: mm@ensoft.co.uk-20130508040022-p36d9m60dlfc7vg2
Latest sync

Show diffs side-by-side

added added

removed removed

Lines of Context:
691
691
except NameError:
692
692
    _putenv = lambda key, value: None
693
693
else:
694
 
    __all__.append("putenv")
 
694
    if "putenv" not in __all__:
 
695
        __all__.append("putenv")
695
696
 
696
697
try:
697
698
    _unsetenv = unsetenv
698
699
except NameError:
699
700
    _unsetenv = lambda key: _putenv(key, "")
700
701
else:
701
 
    __all__.append("unsetenv")
 
702
    if "unsetenv" not in __all__:
 
703
        __all__.append("unsetenv")
702
704
 
703
705
def _createenviron():
704
706
    if name == 'nt':
883
885
otherwise return -SIG, where SIG is the signal that killed it. """
884
886
        return _spawnvef(mode, file, args, env, execvpe)
885
887
 
 
888
 
 
889
    __all__.extend(["spawnv", "spawnve", "spawnvp", "spawnvpe"])
 
890
 
 
891
 
886
892
if _exists("spawnv"):
887
893
    # These aren't supplied by the basic Windows code
888
894
    # but can be easily implemented in Python
908
914
        return spawnve(mode, file, args[:-1], env)
909
915
 
910
916
 
911
 
    __all__.extend(["spawnv", "spawnve", "spawnl", "spawnle",])
 
917
    __all__.extend(["spawnl", "spawnle"])
912
918
 
913
919
 
914
920
if _exists("spawnvp"):
936
942
        return spawnvpe(mode, file, args[:-1], env)
937
943
 
938
944
 
939
 
    __all__.extend(["spawnvp", "spawnvpe", "spawnlp", "spawnlpe",])
 
945
    __all__.extend(["spawnlp", "spawnlpe"])
 
946
 
940
947
 
941
948
import copyreg as _copyreg
942
949