@@ -14,7 +14,9 @@ Installation
1414------------
1515
1616Pip is the preferred way to install PyMI. Pre-compiled binary wheels are
17- available on Pypi [#pymipypi ]_: ::
17+ available on Pypi [#pymipypi ]_:
18+
19+ .. code-block :: powershell
1820
1921 pip install PyMI
2022
@@ -29,7 +31,9 @@ MI module basic usage
2931^^^^^^^^^^^^^^^^^^^^^
3032
3133Here's a simple example which enumerates all processes and kills any instance of
32- "KillerRabbitOfCaerbannog.exe". ::
34+ "KillerRabbitOfCaerbannog.exe".
35+
36+ .. code-block :: python
3337
3438 import mi
3539
@@ -55,7 +59,9 @@ WMI module basic usage
5559^^^^^^^^^^^^^^^^^^^^^^
5660
5761And here's the same example written using the *WMI * module replacement,
58- which provides a simpler and higher level interface over the *mi * API: ::
62+ which provides a simpler and higher level interface over the *mi * API:
63+
64+ .. code-block :: python
5965
6066 import wmi
6167
7177Use the following to build Python 3 wheels. Those will be copied to the build
7278dir.
7379
80+ .. code-block :: powershell
81+
7482 python setup.py bdist_wheel
7583
7684 The best way to build PyMI for Python 2.7 or 3.4 and below is to use the
@@ -84,7 +92,9 @@ distutils will automatically locate your Visual Studio and Windows SDK
8492installation. If you'd like to call vcvarsall.bat yourself and use a specific
8593version, use the following:
8694
87- function SetVCVars($vcvarsdir, $platform="amd64")
95+ .. code-block :: powershell
96+
97+ function SetVCVars ($vcvarsdir , $platform = " amd64" )
8898 {
8999 pushd $vcvarsdir
90100 try
@@ -117,13 +127,17 @@ Debug builds
117127
118128The easiest way to do a debug build is to set the following in setup.cfg:
119129
130+ .. code-block ::
131+
120132 [build]
121133 debug = 1
122134
123135 This will be honored regardless of the build type (e.g. stdist, wheel, etc).
124136
125137To enable distutils debug logging, you may set the following:
126138
139+ .. code-block :: powershell
140+
127141 $env: DISTUTILS_DEBUG = 1
128142
129143 Before doing a debug build, you may wish to clean the build dir.
@@ -137,13 +151,17 @@ automatically generated in the *dist* folder for release builds.
137151
138152Note: the target Python version must be present. The Python path can be
139153customized by setting the corresponding PythonDir* user macro,
140- e.g. *PythonDir_34_x64 *. The *wheel * and *GitPython * packages are required during the build process: ::
154+ e.g. *PythonDir_34_x64 *. The *wheel * and *GitPython * packages are required during the build process:
155+
156+ .. code-block :: powershell
141157
142158 pip install wheel
143159 pip install GitPython
144160
145161 As an alternative, you can use the MSBuild CLI tool:
146162
163+ .. code-block :: powershell
164+
147165 $env: MSBuildEmitSolution = " TRUE"
148166 MSBuild.exe .\PyMI.sln / p:Configuration= " Release (Python 3.7)"
149167
0 commit comments