I have a .replit file.
Updated the run command from run = "python3 main.py"
to run = "python3 main.py input.md"
And trying to run
filename = sys.argv
print(filename)
Running the command manually in the shell gives the expected output: ['main.py', 'input.md']
But hitting the run button still outputs: ['main.py']
How do you get .replit to update the run command?
SOLUTION:
Per the comment above the run command, I commented out the interpreter field a few lines below the run command. And after the shell reloaded the run command worked as expected.
# The command that runs the program. If the interpreter field is set, it will have priority and this run command will do nothing
run = ["python3", "main.py", "input.md"]
# The primary language of the repl. There can be others, though!
language = "python3"
entrypoint = "main.py"
How will changing the entrypoint be an improvement over the current change from this…
run = "python3 main.py"
to this?
run = ["python3", "main.py", "input.md"]
What exactly is the alternate entrypoint solution you propose?
And why is it better?