aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/appnope/py3/README.md
blob: 151250c3d3da2e0a23e6ca8c88b8795a4beb6650 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# `appnope`

Simple package for disabling App Nap on macOS >= 10.9,
which can be problematic.

To disable App Nap:

```python
import appnope
appnope.nope()
```

To reenable, for some reason:

```python
appnope.nap()
```

or to only disable App Nap for a particular block:

```
with appnope.nope_scope():
    do_important_stuff()
```

It uses ctypes to wrap a `[NSProcessInfo beginActivityWithOptions]` call to disable App Nap.

To install:

    pip install appnope