Message174935
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:44 | chris.jerdonek | set | recipients:
+ 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:44 | chris.jerdonek | set | messageid: <[email protected]> |
| 2012-11-05 19:51:44 | chris.jerdonek | link | issue16353 messages |
| 2012-11-05 19:51:44 | chris.jerdonek | create | |
|