OSError: [Errno 13] Permission denied - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: OSError: [Errno 13] Permission denied (/thread-12677.html) |
OSError: [Errno 13] Permission denied - Kolterdyx - Sep-06-2018 I'm trying to make a little program and i have to run an app called pad.py from another one called tarea1.py but when I try it replies this error: (Directories are partly in spanish because I'm from Spain) >>> subprocess.call(["/home/ciro/Escritorio/Programs/Automatic/pad.py"]) The code of tarea1.py app is this:import subprocess import time import tkinter import sys from subprocess import call password = 'patata' while True: clave = input("Clave de acceso: ") if(clave == 'patata'): print('Acceso permitido.') time.sleep(1) subprocess.call(["printf","\033c"]) subprocess.call(["home/ciro/Escritorio/Programs/Automatic/pad.py", "\033c"]) else: print('Acceso denegado.') time.sleep(1) print('') subprocess.call(["printf", "'\033c'"])I tried to use os.system() but it didn't work. I hope someone can help me, please, i didn't find anything in Internet. RE: OSError: [Errno 13] Permission denied - scidam - Sep-07-2018 1) Check execute permission for pad.py : chmod +x pad.py 2) Don't forget to add a magic line (#!/bin/python or #!/custom/path/to/python/interpreter) to your code ( pad.py )...
RE: OSError: [Errno 13] Permission denied - arnavb - Sep-07-2018 As an alternative, you could also prepend the command with python. RE: OSError: [Errno 13] Permission denied - Gribouillis - Sep-07-2018 (Sep-07-2018, 10:39 AM)arnavb Wrote: As an alternative, you could also prepend the command with python.Or better, with sys.executable
|