summaryrefslogtreecommitdiffstats
path: root/Lib/os.py
Commit message (Collapse)AuthorAgeFilesLines
* New generator os.walk() does a bit more than os.path.walk() does, andTim Peters2003-04-251-1/+80
| | | | | seems much easier to use. Code, docs, NEWS, and additions to test_os.py (testing this sucker is a bitch!).
* Get rid of many apply() calls.Guido van Rossum2003-02-271-2/+2
|
* Whitespace normalization.Tim Peters2003-02-191-6/+6
|
* Migrate definitions of several platform-dependent path-related variablesSkip Montanaro2003-02-141-57/+16
| | | | into the relevant path modules. See patch #686397.
* Whitespace normalization.Tim Peters2003-01-291-3/+3
|
* SF patch 661583: Remove old code from lib\os.pyTim Peters2003-01-081-10/+8
| | | | | A patch from Andrew Wilkinson to change some bizarre old exec statements specific to NT and CE.
* Always define getenv(), as suggested by Guido. This means that os.getenv() ↵Jack Jansen2003-01-081-5/+5
| | | | is also defined for MacPython-OS9 (even though it doesn't actually do anything useful), and it shouldn't hurt on other platforms.
* Remove more DOS support.Martin v. Löwis2002-10-091-24/+6
|
* Change UserDict to IterableUserDictRaymond Hettinger2002-09-071-1/+1
|
* Have os.environ() inherit from the iterable version of UserDict.Raymond Hettinger2002-09-061-1/+1
| | | | Closes SF bug 605731.
* Fix for SF bug 601077 by Zack Weinberg.Guido van Rossum2002-09-031-5/+12
| | | | | | | | The new execvpe code would sometimes do the wrong thing when a non-executable file existed earlier in the path and an executable file of the same name existed later in the path. This patch restores the proper behavior (which is to execute the second file). When only a non-executable file exists, the correct error is still reported.
* SF patch 590294: os._execvpe security fix (Zack Weinberg).Guido van Rossum2002-08-051-21/+6
| | | | | | | | | | | | | | 1) Do not attempt to exec a file which does not exist just to find out what error the operating system returns. This is an exploitable race on all platforms that support symbolic links. 2) Immediately re-raise the exception if we get an error other than errno.ENOENT or errno.ENOTDIR. This may need to be adapted for other platforms. (As a security issue, this should be considered for 2.1 and 2.2 as well as 2.3.)
* Be consistent with the functions in the posix/nt module: docstringsFred Drake2002-07-021-3/+3
| | | | don't include a " -> None" for functions that have no return value.
* SF 563203. Replaced 'has_key()' with 'in'.Raymond Hettinger2002-06-011-2/+4
|
* Patch 550804: Make os.environ.copy() return a copy.Martin v. Löwis2002-05-021-0/+4
|
* Convert a pile of obvious "yes/no" functions to return bool.Tim Peters2002-04-041-2/+2
|
* ....Michael W. Hudson2002-03-151-1/+1
|
* FixMichael W. Hudson2002-03-151-2/+9
| | | | | | | | [ 530236 ] os.py assumes existence of statvfs_resul This was pretty dense of me. Sorry. 2.2.1 candidate.
* Special support for pickling os.stat and os.stat_vfs results portablyMichael W. Hudson2002-03-061-0/+20
| | | | | | | | (the types come from different modules on different platforms). Added tests for pickling these types. May be a bugfix candidate.
* OS/2 EMX port Library and regression test changes:Andrew MacIntyre2002-02-241-4/+15
| | | | | | | | | | | Lib/ os.py os2emxpath.py // added - OS/2 EMX specific path manipulation routines popen2.py site.py Lib/test/ test_fcntl.py test_longexp.py
* Whitespace normalization.Tim Peters2001-10-301-2/+2
|
* SF patch #474590 -- RISC OS supportGuido van Rossum2001-10-241-0/+7
|
* SF patch #460805 by Chris Gonnerman: Support for unsetenv()Guido van Rossum2001-10-191-2/+26
| | | | | | | | This adds unsetenv to posix, and uses it in the __delitem__ method of os.environ. (XXX Should we change the preferred name for putenv to setenv, for consistency?)
* Unify _Environ processing on riscos with other platforms.Martin v. Löwis2001-03-071-11/+12
|
* fix typo in extending __all__ for riscos platform - closes bug 406296Skip Montanaro2001-03-061-1/+1
|
* Use r""" instead of """ for the docstring so that backslashes are preserved.Ka-Ping Yee2001-03-021-1/+1
|
* Fix by Donn Cave for BeOS (SF #403642):Guido van Rossum2001-03-021-4/+13
| | | | | | | | | | | | | | UNIX style fork/execve/wait are not fully compatible with thread support on BeOS. For Python, that means neither fork() from import nor import from a fork work reliably. os._execvpe() does the latter, importing tempfile to set up a tantalizing target for hackers. This patch replaces both the tempfile name generation and the exec that uses it, in case we're on BeOS. Need this for setup:distutils:execvp(); symptoms are random crashes and internal BeOS error messages about th name, in case we're on BeOS. It's an issue because setup.py + distutils calls os.execvp(); symptoms are random crashes during setup.py, and internal BeOS error messages about thread IDs.
* RISCOS changes by dschwertberger.Guido van Rossum2001-03-021-15/+35
|
* added some elements missing from __all__Skip Montanaro2001-02-281-1/+2
|
* added several more __all__ listsSkip Montanaro2001-02-061-0/+56
|
* Whitespace normalization.Tim Peters2001-01-151-3/+3
|
* popen4(): Added for Unix.Fred Drake2000-09-281-3/+7
| | | | Fixed a typo in a docstring.
* Only supply popen2, popen3 when fork exists.Guido van Rossum2000-09-191-13/+15
| | | | (This avoids defining non-working versions of these on the Mac.)
* Added os.popen2() and os.popen3() for non-Windows platforms.Fred Drake2000-08-281-0/+13
|
* makedirs(), removedirs(): If the tail of the path is empty, do a secondFred Drake2000-07-251-0/+4
| | | | | | split so the logic does not fail in corner cases. This closes bug #407.
* Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters2000-07-161-2/+2
| | | | | | | | | | comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;)
* Michael Hudson fixes a case where execv() is called (for a test) withGuido van Rossum2000-04-261-1/+1
| | | | | an empty argument list -- another patch he's checking in will make this illegal (the first argument should always be the program name).
* Michael Hudson:Guido van Rossum2000-04-251-1/+29
| | | | | | | | I think that after this patch, all objects in the os module (with names that don't start with "_") that can have docstrings, do, on Linux at least. Also fix a nit in one of my spawn* docstrings.
* Doc strings for the spawn* functions, by Michael Hudson.Guido van Rossum2000-04-211-0/+56
|
* Patch by Fred Gansevles.Guido van Rossum2000-04-041-9/+15
| | | | | | | | | | | This patch solves 2 problems of the os module. 1) Bug ID #50 (case-mismatch wiht "environ.get(..,..)" and "del environ[..]") 2) os.environ.update (dict) doesn't propagate changes to the 'real' environment (i.e doesn't call putenv) This patches also has minor changes specific for 1.6a The string module isn't used anymore, instead the strings own methods are used.
* Actually, the previous batch's comment should have been different;Guido van Rossum2000-02-041-5/+6
| | | | | | | | | | *this* set of patches is Ka-Ping's final sweep: The attached patches update the standard library so that all modules have docstrings beginning with one-line summaries. A new docstring was added to formatter. The docstring for os.py was updated to mention nt, os2, ce in addition to posix, dos, mac.
* More trivial comment -> docstring transformations by Ka-Ping Yee,Guido van Rossum2000-02-041-18/+19
| | | | | | | | | | | | | | | | | | who writes: Here is batch 2, as a big collection of CVS context diffs. Along with moving comments into docstrings, i've added a couple of missing docstrings and attempted to make sure more module docstrings begin with a one-line summary. I did not add docstrings to the methods in profile.py for fear of upsetting any careful optimizations there, though i did move class documentation into class docstrings. The convention i'm using is to leave credits/version/copyright type of stuff in # comments, and move the rest of the descriptive stuff about module usage into module docstrings. Hope this is okay.
* Oops. spawnl() and spawnle() should be implemented on Windows too.Guido van Rossum1999-11-021-7/+14
| | | | | Also added a comment that the 'p' variants (spawnvp() etc.) are *not* supported on Windows. (They could be by adding them to posixmodule.c)
* Checking in a bunch of spawn functions. These are only defined if weGuido van Rossum1999-11-021-2/+80
| | | | | | | | have fork and execv (and friends) but not spawnv. They operate exactly like the spawn functions on Windows. A limited set of needed constants is also defined (P_WAIT, P_NOWAIT etc.). Also add getenv() as a familiar alias for environ.get().
* Mark Hammond: patch for Windows/CE.Guido van Rossum1999-06-111-0/+15
|
* The case-insensitive _Environ class was lacking a case-insensitive has_key().Guido van Rossum1999-05-031-0/+2
|
* As Finn Bock points out, _P_WAIT etc. don't have a leading underscoreGuido van Rossum1999-02-221-3/+1
| | | | so they don't need to be treated specially here.
* Special-case _P_WAIT etc. for NT.Guido van Rossum1999-02-011-4/+7
|
* Enable os.path as a mostly-normal submodule, including "from os.pathFred Drake1999-01-191-0/+2
| | | | import isfile" and "import os.path".
* Support case insensitive treatment of os.environ keys on Windows andGuido van Rossum1998-08-041-8/+7
| | | | | | | | | | | DOS (as well as OS/2). I presume that making a call to putenv() with a lowercase key will actually do the right thing. I know this is so on Windows/DOS, and I expect it is so OS/2 -- but the old OS/2 code didn't assume this. (I don't know if the person who provided the OS/2 patch was clueless or just didn't care about DOS and Windows.) Also ripped out the support for pickling -- as of 1.5, this is no longer needed to make pickling work.