You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
one more question: can the files array (in JSON request) contain a simple text file that is (not compiled, obviously) then used as a param in the run command?
Basically, I'm looking for a way of running/testing the program with different input.
You can specify a custom run command with the command attribute.
And yes you can send in arbitrary text files. I made an example python snippet which reads a text file from stdin here: https://glot.io/snippets/ebj1rtktlt.
The api payload looks like this:
{"files": [{"name": "foo.py","content": "import sys\n\nfor line in sys.stdin:\n print(line.rstrip())"},{"name": "input.txt","content": "1\n2\n3"}],"command": "cat input.txt | python foo.py"}
Sorry, I see that it's available on the website, but couldn't find any real API examples. Is it a thing (specifying custom run command)?
The text was updated successfully, but these errors were encountered: