Chris Jerdonek added the comment:

Some minor comments.

+.. function :: get_shell()
+
+  Return the path to default shell.

Three leading spaces needed.  Also, "Return the path to the default shell."

+  For unix system returns path to ``sh``, for windows returns path to 
``cmd.exe``.

"On Unix systems returns the path to ``sh``, and on Windows returns the path to 
``cmd.exe``."  I would also document and test FileNotFound (e.g. by temporarily 
changing os.confstr).

+        """Return the path to default shell for Unix."""

the default shell

+        """Return the path to default shell for Windows."""

the default shell

+class TestGetShell(unittest.TestCase):
+    def test_get_shell(self):
+        shell = os.get_shell()
+        param = "/c" if sys.platform == 'win32' else "-c"
+        s = subprocess.Popen([shell, param, "echo test"],
+                                stdout=subprocess.PIPE)

Alignment should be:

+        s = subprocess.Popen([shell, param, "echo test"],
+                             stdout=subprocess.PIPE)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16353>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to