Message174935
| 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 |
<1352145104.72.0.26151530912.issue16353@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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) |
|
History
|
|---|
| 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: <1352145104.72.0.26151530912.issue16353@psf.upfronthosting.co.za> |
| 2012年11月05日 19:51:44 | chris.jerdonek | link | issue16353 messages |
| 2012年11月05日 19:51:44 | chris.jerdonek | create |
|