def pledge(promises: Optional[Iterable[str]] = None,
execpromises: Optional[Iterable[str]] = None) -> None: ...
Throws OSError if the platform does not support pledge(2) or if the pledge fails.
Example
The following will restrict the current process to only the stdio and tty promises, and then attempt to violate that restriction:
import pypledge
pypledge.pledge(['stdio', 'tty'])
f = open('foo.txt')
On OpenBSD 5.9, this will terminate with SIGABRT because the rpath promise was required.
On other platforms, this will throw OSError.
Metadata
Release files for pypledge 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pypledge-0.3.1.tar.gz | 2.1 kB | Details |
Release files / pypledge-0.3.1.tar.gz
| Download URL | pypledge-0.3.1.tar.gz |
|---|---|
| Size | 2.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6e8438f722605b13c9cbf5259b6593022045c815e51db55f41a86660e53791f
|
|
BLAKE2b-256 checksum How to use checksums |
ff8368ede0961a31c7deda0833a682d1c2be5bd8f57bb022341fff375300ec56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|