METADATA 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. Metadata-Version: 2.1
  2. Name: appnope
  3. Version: 0.1.3
  4. Summary: Disable App Nap on macOS >= 10.9
  5. Home-page: http://github.com/minrk/appnope
  6. Author: Min Ragan-Kelley
  7. Author-email: benjaminrk@gmail.com
  8. License: BSD
  9. Platform: UNKNOWN
  10. Classifier: License :: OSI Approved :: BSD License
  11. Classifier: Operating System :: MacOS :: MacOS X
  12. Classifier: Programming Language :: Python :: 2
  13. Classifier: Programming Language :: Python :: 2.6
  14. Classifier: Programming Language :: Python :: 2.7
  15. Classifier: Programming Language :: Python :: 3
  16. Classifier: Programming Language :: Python :: 3.2
  17. Classifier: Programming Language :: Python :: 3.3
  18. Description-Content-Type: text/markdown
  19. License-File: LICENSE
  20. # `appnope`
  21. Simple package for disabling App Nap on macOS >= 10.9,
  22. which can be problematic.
  23. To disable App Nap:
  24. ```python
  25. import appnope
  26. appnope.nope()
  27. ```
  28. To reenable, for some reason:
  29. ```python
  30. appnope.nap()
  31. ```
  32. or to only disable App Nap for a particular block:
  33. ```
  34. with appnope.nope_scope():
  35. do_important_stuff()
  36. ```
  37. It uses ctypes to wrap a `[NSProcessInfo beginActivityWithOptions]` call to disable App Nap.
  38. To install:
  39. pip install appnope