| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
| |
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?)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixed a typo in a docstring.
|
|
|
|
| |
(This avoids defining non-working versions of these on the Mac.)
|
| |
|
|
|
|
|
|
| |
split so the logic does not fail in corner cases.
This closes bug #407.
|
|
|
|
|
|
|
|
|
|
| |
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 ;)
|
|
|
|
|
| |
an empty argument list -- another patch he's checking in will make
this illegal (the first argument should always be the program name).
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
*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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Also added a comment that the 'p' variants (spawnvp() etc.) are *not*
supported on Windows. (They could be by adding them to posixmodule.c)
|
|
|
|
|
|
|
|
| |
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().
|
| |
|
| |
|
|
|
|
| |
so they don't need to be treated specially here.
|
| |
|
|
|
|
| |
import isfile" and "import os.path".
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
of mkdir(), rmdir() and rename() that make or remove intermediate
directories as well.
|
|
|
|
|
| |
platform's line separator. \n on Unix, \r\n on DOS, OS/2 and Windows,
\r on Macs.
|
|
|
|
| |
Also added one more os2 specific piece of code, by Jeff Rush.
|
|
|
|
|
|
| |
as does unpickling, as in: pickle.loads(pickle.dumps(os.environ)).
Hope this is right! Don't shoot me Guido. :-)
|
| |
|
|
|
|
|
| |
Adding support for a new OS is now a bit more work, but I bet that
'dos' or 'nt' will cover most situations...
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
negative start indices starting from the right.
* ftplib.py: debug() -> set_debuglevel(); change demo to use __init__().
* os.py: added execl, execlp, and execvp.
* lambda.py: removed (now that we have built-in map, reduce, bagof, lambda)
* test_b{1,2}.py, testall.out: added tests for bagof, lambda, map, reduce
* commands.py: use os, not posix
* test_grammar.py: make it easy to disable non-portable int overflow tests
* dis.py: don't abuse range()
|
|
|
|
| |
* Added fcmp() to test_support.py and use it in test*.py
|
|
|
|
|
| |
string.splitfields(s, '') now returns [s] as split() in nawk.
Added _exit to exported functions of os.
|
| |
|
| |
|
|
|