/bin/sh: file.py Permissions Denied
Ok, I hope this is the last question that I have to ask that is in relation with those 2 other ones before it. This one is a little different though. So, I tried linking the other file by doing
print(os.popen('/home/runner/Chatroom/file.py').read()) but that outputs a new error to me in the console, it says
/bin/sh: 1: /home/runner/Chatroom/function.py: Permission denie
d I do not know what this means. But it looks like an improvement, given that it says permission denied, so maybe replit now recognizes the file?
@BraylanBB121 You will see that the
setup function is called at the bottom of the code window. The chatters names are obtained along with the name of the one who is to go first. Then there is some basic error checking to see if: a) the two names are the same as that would be confusing, b) the name entered as the one that is to go first is one of the two names previously entered. Once these checks are made the
chat function is called with the chatters names (in a list), plus the name of the chatter who is to go first passed in as arguments. The
chat function then uses these values to generate a back and forwards conversion between the chatters. I will comment the code so that you can understand what is happening.