On this page
signal.Sigmasks
Prev: signal.siginterrupt | Up: signal | Next: signal.signal
Rel: signal.alarm, signal.default_int_handler, signal.getitimer, signal.getsignal
Ref: docs.python.org — signal.Sigmasks
Tags: #public #python3 #stdlib #signal
Import
import signal
from signal import Sigmasks
Signature & Overview
signal.Sigmasks(*values)
An enumeration.
Methods & Attributes
Sigmasks.as_integer_ratio(self, /)— Return a pair of integers, whose ratio is equal to the original int.Sigmasks.bit_count(self, /)— Number of ones in the binary representation of the absolute value of self.Sigmasks.bit_length(self, /)— Number of bits necessary to represent self in binary.Sigmasks.conjugate(self, /)— Returns self, the complex conjugate of any int.Sigmasks.from_bytes(bytes, byteorder='big', *, signed=False)— Return the integer represented by the given array of bytes.Sigmasks.is_integer(self, /)— Returns True. Exists for duck type compatibility with float.is_integer.Sigmasks.to_bytes(self, /, length=1, byteorder='big', *, signed=False)— Return an array of bytes representing an integer.
Usage
import signal
if hasattr(signal, 'Sigmasks'):
assert signal.SIG_BLOCK in signal.Sigmasks
Gotchas
- Unix-only
IntEnum(SIG_BLOCK,SIG_UNBLOCK,SIG_SETMASK) forpthread_sigmask().
REPL Inspect
from signal import Sigmasks
help(Sigmasks)
Linked from
Related notes
- tuts/python3/stdlib_module/signal/siginterrupt Linked here; links to this page; shared tags: #signal, #stdlib
- tuts/python3/stdlib_module/signal/signal Linked here; links to this page; shared tags: #signal, #stdlib
- tuts/python3/stdlib_module/signal/alarm Linked here; shared tags: #signal, #stdlib
- tuts/python3/stdlib_module/signal/default_int_handler Linked here; shared tags: #signal, #stdlib
- tuts/python3/stdlib_module/signal/getitimer Linked here; shared tags: #signal, #stdlib
- tuts/python3/stdlib_module/signal/getsignal Linked here; shared tags: #signal, #stdlib
- tuts/python3/stdlib_module/signal links to this page; shared tags: #stdlib
- tuts/c/stdlib/signal shared tags: #signal, #stdlib
- tuts/c/stdlib/signal/signal shared tags: #signal, #stdlib
- tuts/python3/stdlib_module/signal/Handlers shared tags: #signal, #stdlib