2

I am a new Mac User.

I am making a Python Application which takes screenshots. It works perfectly in Linux and Windows. When I open my app (in Mac); I noticed that I have to give permission in System Preferences > Security & Privacy > Screen Recording and then allow apps to record screen.

I turned Screen Recording on and after a while I turned it off. Now when I reopened my app, Mac did not asked the prompt if I have to give rights. And also it was not able to access Screen.

Well, how can I check if user has enabled the permission in python? Something like this.

file.py

if check_permission():
    perform_task()
else:
    if ask_permission:
        perform_task()
    else:
        print("You do not have enough rights")

Correct me if I am wrong. I am new to Mac. Any help is appreciable. Thanks in advance :)

ajinzrathod
  • 925
  • 10
  • 28
  • You might find some help reading the answer to [this](https://stackoverflow.com/questions/67018753/errno-13-permission-on-macos). –  Jun 05 '21 at 09:21

0 Answers0