Skip to content

Commit 6b24376

Browse files
authored
Manpage formatting tweaks & lint (GH-132338)
Following on from GH-132291 this is the second part of the patch from https://bugs.debian.org/1101406 This tweaks the formatting of a few bits of the manpage.
1 parent 57d4446 commit 6b24376

1 file changed

Lines changed: 47 additions & 33 deletions

File tree

Misc/python.man

Lines changed: 47 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH PYTHON "1"
1+
.TH PYTHON 1
22

33
.\" To view this file while editing, run it through groff:
44
.\" groff -Tascii -man python.man | less
@@ -162,7 +162,7 @@ compilation options).
162162
Ignore environment variables like PYTHONPATH and PYTHONHOME that modify
163163
the behavior of the interpreter.
164164
.TP
165-
.B \-h ", " \-? ", "\-\-help
165+
.BR \-h ", " \-? ", " \-\-help
166166
Prints the usage for the interpreter executable and exits.
167167
.TP
168168
.B "\-\-help\-env"
@@ -171,7 +171,6 @@ Prints help about Python-specific environment variables and exits.
171171
.B "\-\-help\-xoptions"
172172
Prints help about implementation-specific \fB\-X\fP options and exits.
173173
.TP
174-
.TP
175174
.B "\-\-help\-all"
176175
Prints complete usage information and exits.
177176
.TP
@@ -243,7 +242,7 @@ twice, print a message for each file that is checked for when
243242
searching for a module. Also provides information on module cleanup
244243
at exit.
245244
.TP
246-
.B \-V ", " \-\-version
245+
.BR \-V ", " \-\-version
247246
Prints the Python version number of the executable and exits. When given
248247
twice, print more information about the build.
249248

@@ -255,23 +254,38 @@ to
255254

256255
The simplest settings apply a particular action unconditionally to all warnings
257256
emitted by a process (even those that are otherwise ignored by default):
258-
259-
-Wdefault # Warn once per call location
260-
-Werror # Convert to exceptions
261-
-Walways # Warn every time
262-
-Wall # Same as -Walways
263-
-Wmodule # Warn once per calling module
264-
-Wonce # Warn once per Python process
265-
-Wignore # Never warn
266-
257+
.RS
258+
.TP
259+
.B \-Wdefault
260+
Warn once per call location
261+
.TP
262+
.B \-Werror
263+
Convert to exceptions
264+
.TP
265+
.B \-Walways
266+
Warn every time
267+
.TP
268+
.B \-Wall
269+
Same as \-Walways
270+
.TP
271+
.B \-Wmodule
272+
Warn once per calling module
273+
.TP
274+
.B \-Wonce
275+
Warn once per Python process
276+
.TP
277+
.B \-Wignore
278+
Never warn
279+
.RE
280+
.IP
267281
The action names can be abbreviated as desired and the interpreter will resolve
268282
them to the appropriate action name. For example,
269283
.B \-Wi
270284
is the same as
271-
.B \-Wignore .
285+
.BR \-Wignore .
272286

273287
The full form of argument is:
274-
.IB action:message:category:module:lineno
288+
.IB action : message : category : module : lineno
275289

276290
Empty fields match all values; trailing empty fields may be omitted. For
277291
example
@@ -457,7 +471,7 @@ is an empty string; if
457471
is used,
458472
.I sys.argv[0]
459473
contains the string
460-
.I '\-c'.
474+
.RI ' \-c '.
461475
Note that options interpreted by the Python interpreter itself
462476
are not placed in
463477
.IR sys.argv .
@@ -531,12 +545,12 @@ the \fB\-d\fP option. If set to an integer, it is equivalent to
531545
specifying \fB\-d\fP multiple times.
532546
.IP PYTHONEXECUTABLE
533547
If this environment variable is set,
534-
.IB sys.argv[0]
548+
.I sys.argv[0]
535549
will be set to its value instead of the value got through the C runtime. Only
536550
works on Mac OS X.
537551
.IP PYTHONFAULTHANDLER
538552
If this environment variable is set to a non-empty string,
539-
.IR faulthandler.enable()
553+
.I faulthandler.enable()
540554
is called at startup: install a handler for SIGSEGV, SIGFPE, SIGABRT, SIGBUS
541555
and SIGILL signals to dump the Python traceback.
542556
.IP
@@ -584,8 +598,8 @@ purpose is to allow repeatable hashing, such as for selftests for the
584598
interpreter itself, or to allow a cluster of python processes to share hash
585599
values.
586600

587-
The integer must be a decimal number in the range [0,4294967295]. Specifying
588-
the value 0 will disable hash randomization.
601+
The integer must be a decimal number in the range [0,4\|294\|967\|295].
602+
Specifying the value 0 will disable hash randomization.
589603
.IP PYTHONHOME
590604
Change the location of the standard Python libraries. By default, the
591605
libraries are searched in ${prefix}/lib/python<version> and
@@ -607,16 +621,16 @@ This is equivalent to the \fB\-X int_max_str_digits=\fINUMBER\fR option.
607621
.IP PYTHONIOENCODING
608622
If this is set before running the interpreter, it overrides the encoding used
609623
for stdin/stdout/stderr, in the syntax
610-
.IB encodingname ":" errorhandler
624+
.IB encodingname : errorhandler
611625
The
612-
.IB errorhandler
626+
.I errorhandler
613627
part is optional and has the same meaning as in str.encode. For stderr, the
614-
.IB errorhandler
628+
.I errorhandler
615629
part is ignored; the handler will always be \'backslashreplace\'.
616630
.IP PYTHONMALLOC
617631
Set the Python memory allocators and/or install debug hooks. The available
618632
memory allocators are
619-
.IR malloc
633+
.I malloc
620634
and
621635
.IR pymalloc .
622636
The available debug hooks are
@@ -626,7 +640,7 @@ and
626640
.IR pymalloc_debug .
627641
.IP
628642
When Python is compiled in debug mode, the default is
629-
.IR pymalloc_debug
643+
.I pymalloc_debug
630644
and the debug hooks are automatically used. Otherwise, the default is
631645
.IR pymalloc .
632646
.IP PYTHONMALLOCSTATS
@@ -707,14 +721,14 @@ Python memory allocations using the tracemalloc module.
707721
.IP
708722
The value of the variable is the maximum number of frames stored in a
709723
traceback of a trace. For example,
710-
.IB PYTHONTRACEMALLOC=1
724+
.I PYTHONTRACEMALLOC=1
711725
stores only the most recent frame.
712726
.IP PYTHONUNBUFFERED
713727
If this is set to a non-empty string it is equivalent to specifying
714728
the \fB\-u\fP option.
715729
.IP PYTHONUSERBASE
716730
Defines the user base directory, which is used to compute the path of the user
717-
.IR site\-packages
731+
.I site\-packages
718732
directory and installation paths for
719733
.IR "python \-m pip install \-\-user" .
720734
.IP PYTHONUTF8
@@ -750,17 +764,17 @@ This is equivalent to the \fB\-X presite=\fImodule\fR option.
750764
.SH AUTHOR
751765
The Python Software Foundation: https://www.python.org/psf/
752766
.SH INTERNET RESOURCES
753-
Main website: https://www.python.org/
767+
Main website: https://www.python.org/
754768
.br
755-
Documentation: https://docs.python.org/
769+
Documentation: https://docs.python.org/
756770
.br
757-
Developer resources: https://devguide.python.org/
771+
Developer resources: https://devguide.python.org/
758772
.br
759-
Downloads: https://www.python.org/downloads/
773+
Downloads: https://www.python.org/downloads/
760774
.br
761-
Module repository: https://pypi.org/
775+
Module repository: https://pypi.org/
762776
.br
763-
Newsgroups: comp.lang.python, comp.lang.python.announce
777+
Newsgroups: comp.lang.python, comp.lang.python.announce
764778
.SH LICENSING
765779
Python is distributed under an Open Source license. See the file
766780
"LICENSE" in the Python source distribution for information on terms &

0 commit comments

Comments
 (0)