File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ Shellingham detects what shell the current Python executable is running in.
1111Usage
1212=====
1313
14- ::
14+ .. code-block :: python
1515
1616 >> > import shellingham
1717 >> > shellingham.detect_shell()
@@ -43,13 +43,16 @@ Shellingham raises ``ShellDetectionFailure`` if there is no shell to detect,
4343but *your application should almost never do this to your user *.
4444
4545A practical approach to this is to wrap ``detect_shell `` in a try block, and
46- provide a sane default on failure::
46+ provide a sane default on failure
47+
48+ .. code-block :: python
4749
4850 try :
4951 shell = shellingham.detect_shell()
5052 except shellingham.ShellDetectionFailure:
5153 shell = provide_default()
5254
55+
5356 There are a few choices for you to choose from.
5457
5558* The POSIX standard mandates the environment variable ``SHELL `` to refer to
@@ -63,7 +66,9 @@ There are a few choices for you to choose from.
6366 This can always be used to launch a usable command prompt (e.g. `cmd.exe ` on
6467 Windows).
6568
66- Here's a simple implementation to provide a default shell::
69+ Here's a simple implementation to provide a default shell
70+
71+ .. code-block :: python
6772
6873 import os
6974
You can’t perform that action at this time.
0 commit comments