diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2009-01-02 21:00:35 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2009-01-02 21:00:35 (GMT) |
commit | 10b1ec98df5acc652cf10d0f77340b66ab5b8f38 (patch) | |
tree | 7ee5ff674d9503ab2474b563d06fd633dbd1d79e /Doc/whatsnew | |
parent | 796798b29c711f6bb0ac08feccf47ab7c41bd215 (diff) | |
download | cpython-10b1ec98df5acc652cf10d0f77340b66ab5b8f38.zip cpython-10b1ec98df5acc652cf10d0f77340b66ab5b8f38.tar.gz cpython-10b1ec98df5acc652cf10d0f77340b66ab5b8f38.tar.bz2 |
Add various items
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/2.7.rst | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/Doc/whatsnew/2.7.rst b/Doc/whatsnew/2.7.rst index 61084c8..da17620 100644 --- a/Doc/whatsnew/2.7.rst +++ b/Doc/whatsnew/2.7.rst @@ -103,7 +103,23 @@ changes, sorted alphabetically by module name. Consult the :file:`Misc/NEWS` file in the source tree for a more complete list of changes, or look through the Subversion logs for all the details. -* To be written. +* A new function in the :mod:`subprocess` module, + :func:`check_output`, runs a command with a specified set of arguments + and returns the command's output as a string if the command runs without + error, or raises a :exc:`CalledProcessError` exception otherwise. + + :: + + >>> subprocess.check_output(['df', '-h', '.']) + 'Filesystem Size Used Avail Capacity Mounted on\n + /dev/disk0s2 52G 49G 3.0G 94% /\n' + + >>> subprocess.check_output(['df', '-h', '/bogus']) + ... + subprocess.CalledProcessError: Command '['df', '-h', '/bogus']' returned non-zero exit status 1 + + (Contributed by Gregory P. Smith.) + .. ====================================================================== .. whole new modules get described in subsections here @@ -116,13 +132,22 @@ Build and C API Changes Changes to Python's build process and to the C API include: -* To be written. +* If you use the :file:`.gdbinit` file provided with Python, + the "pyo" macro in the 2.7 version will now work when the thread being + debugged doesn't hold the GIL; the macro will now acquire it before printing. + (Contributed by haypo XXX; :issue:`3632`.) .. ====================================================================== Port-Specific Changes: Windows ----------------------------------- +* The :mod:`msvcrt` module now contains some constants from + the :file:`crtassem.h` header file: + :data:`CRT_ASSEMBLY_VERSION`, + :data:`VC_ASSEMBLY_PUBLICKEYTOKEN`, + and :data:`LIBRARIES_ASSEMBLY_NAME_PREFIX`. + (Added by Martin von Loewis (XXX check); :issue:`4365`.) .. ====================================================================== |