17
17
section.
18
18
19
19
20
- Cross Platform
20
+ Cross platform
21
21
--------------
22
22
23
23
@@ -188,7 +188,7 @@ Cross Platform
188
188
:attr: `processor ` is resolved late instead of immediately.
189
189
190
190
191
- Java Platform
191
+ Java platform
192
192
-------------
193
193
194
194
@@ -206,7 +206,7 @@ Java Platform
206
206
and was only useful for Jython support.
207
207
208
208
209
- Windows Platform
209
+ Windows platform
210
210
----------------
211
211
212
212
@@ -240,7 +240,7 @@ Windows Platform
240
240
.. versionadded :: 3.8
241
241
242
242
243
- macOS Platform
243
+ macOS platform
244
244
--------------
245
245
246
246
.. function :: mac_ver(release='', versioninfo=('','',''), machine='')
@@ -252,7 +252,7 @@ macOS Platform
252
252
Entries which cannot be determined are set to ``'' ``. All tuple entries are
253
253
strings.
254
254
255
- iOS Platform
255
+ iOS platform
256
256
------------
257
257
258
258
.. function :: ios_ver(system='', release='', model='', is_simulator=False)
@@ -271,7 +271,7 @@ iOS Platform
271
271
parameters.
272
272
273
273
274
- Unix Platforms
274
+ Unix platforms
275
275
--------------
276
276
277
277
.. function :: libc_ver(executable=sys.executable, lib='', version='', chunksize=16384)
@@ -287,7 +287,7 @@ Unix Platforms
287
287
The file is read and scanned in chunks of *chunksize * bytes.
288
288
289
289
290
- Linux Platforms
290
+ Linux platforms
291
291
---------------
292
292
293
293
.. function :: freedesktop_os_release()
@@ -325,7 +325,7 @@ Linux Platforms
325
325
.. versionadded :: 3.10
326
326
327
327
328
- Android Platform
328
+ Android platform
329
329
----------------
330
330
331
331
.. function :: android_ver(release="", api_level=0, manufacturer="", \
@@ -359,3 +359,32 @@ Android Platform
359
359
<https://storage.googleapis.com/play_public/supported_devices.html> `__.
360
360
361
361
.. versionadded :: 3.13
362
+
363
+ .. _platform-cli :
364
+
365
+ Command-line usage
366
+ ------------------
367
+
368
+ :mod: `platform ` can also be invoked directly using the :option: `-m `
369
+ switch of the interpreter::
370
+
371
+ python -m platform [--terse] [--nonaliased] [{nonaliased,terse} ...]
372
+
373
+ The following options are accepted:
374
+
375
+ .. program :: platform
376
+
377
+ .. option :: --terse
378
+
379
+ Print terse information about the platform. This is equivalent to
380
+ calling :func: `platform.platform ` with the *terse * argument set to ``True ``.
381
+
382
+ .. option :: --nonaliased
383
+
384
+ Print platform information without system/OS name aliasing. This is
385
+ equivalent to calling :func: `platform.platform ` with the *aliased * argument
386
+ set to ``True ``.
387
+
388
+ You can also pass one or more positional arguments (``terse ``, ``nonaliased ``)
389
+ to explicitly control the output format. These behave similarly to their
390
+ corresponding options.
0 commit comments