Passing in cmd line args for Python that uses sys.argv[1]?

A few years ago, I edited the .replit file to pass in the argv[1] so the green PLAY button worked
run = “python3 main.py myfile.csv

This still works on my old repl script
but I uploaded a new one today and this no longer works.

Did something change? Nix?

Could we have a link to the repl?

I deleted the entire section called
[interpreter]

1 Like

Yeah you need that lol

No, I believe the solution was to remove it. Not the problem.

1 Like

Nowadays, there are multiple places you would need to edit. I would just do CTRL + F and search for main.py in the .replit file and replace every occurrence (usually 3 from memory) with the added argument you want.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.