Skip to content
← Back to Community
"PermissionError: [Errno 13] Permission denied" Blocks access to main.py
Profile icon
Commander07

Hello so i have a program in which i try to send a string to stdin in a python file but for some reason i get the error "PermissionError: [Errno 13] Permission denied" for every file even the main.py file here is my code
##############
MAIN.PY
import subprocess,os
def server_command(cmd):
process.stdin.write(cmd+"\n")
process = None
executable = f"{os.getcwd()}/console.py"
process = subprocess.Popen(executable, stdin=subprocess.PIPE)
server_command("test")
########################
console.py
print(input())

Voters
Profile icon
ArtcraftGaming
Profile icon
HaykAprikyan
Profile icon
Commander07
Comments
hotnewtop
Profile icon
HaykAprikyan
Profile icon
SixBeeps

You're not allowed to open other executables.

Profile icon
Commander07

@SixBeeps dosent seem like it ive just tried another way and it worked either you can or repl.it has crap ways of blocking

Profile icon
SixBeeps

@Commander07 Maybe I'm just big dumb and can not unable to thonk. Ofc you would be able to run other executables, I've done it before.

Just ignore I said what I said.

Profile icon
Dart

@Commander07 hey please do not use vulgar language in comments I changed it for you (this is a Christian Minecraft server)

Profile icon
[deleted]

@Zexogon so is 2b2t