Author chris.jerdonek
Recipients asvetlov, chris.jerdonek, christian.heimes, eric.araujo, ezio.melotti, gregory.p.smith, lyapun, neologix, pitrou, r.david.murray, tim.golden
Date 2012-11-05.19:51:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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)
Date User Action Args
2012-11-05 19:51:44chris.jerdoneksetrecipients: + chris.jerdonek, gregory.p.smith, pitrou, christian.heimes, tim.golden, ezio.melotti, eric.araujo, r.david.murray, asvetlov, neologix, lyapun
2012-11-05 19:51:44chris.jerdoneksetmessageid: <>
2012-11-05 19:51:44chris.jerdoneklinkissue16353 messages
2012-11-05 19:51:44chris.jerdonekcreate