[Python-checkins] r54361 - in python/trunk: Doc/lib/libcommands.tex Lib/commands.py
georg.brandl
python-checkins at python.org
Tue Mar 13 22:32:04 CET 2007
Author: georg.brandl
Date: Tue Mar 13 22:32:01 2007
New Revision: 54361
Modified:
python/trunk/Doc/lib/libcommands.tex
python/trunk/Lib/commands.py
Log:
Deprecate commands.getstatus().
Modified: python/trunk/Doc/lib/libcommands.tex
==============================================================================
--- python/trunk/Doc/lib/libcommands.tex (original)
+++ python/trunk/Doc/lib/libcommands.tex Tue Mar 13 22:32:01 2007
@@ -39,6 +39,10 @@
Return the output of \samp{ls -ld \var{file}} as a string. This
function uses the \function{getoutput()} function, and properly
escapes backslashes and dollar signs in the argument.
+
+\deprecated{2.6}{This function is nonobvious and useless,
+ also the name is misleading in the presence of
+ \function{getstatusoutput()}.}
\end{funcdesc}
Example:
Modified: python/trunk/Lib/commands.py
==============================================================================
--- python/trunk/Lib/commands.py (original)
+++ python/trunk/Lib/commands.py Tue Mar 13 22:32:01 2007
@@ -32,6 +32,8 @@
#
def getstatus(file):
"""Return output of "ls -ld <file>" in a string."""
+ import warnings
+ warnings.warn("commands.getstatus() is deprecated", DeprecationWarning)
return getoutput('ls -ld' + mkarg(file))
More information about the Python-checkins
mailing list