I
I
Ivan Chekhouv2020-02-08 23:10:03
Python
Ivan Chekhouv, 2020-02-08 23:10:03

Python. Permission denied, what to do?

Code:
import os
a=input('Enter 1 to open calculator: ')
if a =='1':
os.system(r"App_calculator/calc.py")

Error:
sh: App_calculator/calc.py: can 't execute: Permission denied

What to do about it? Help me please!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
@
@cotkl, 2020-02-08
_

There are not enough rights to open.
Try adding os.startfile to the beginning of the line.
Immediately upon startup, the uac dialog is requested, and the program is then run as administrator.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question