We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any direct way to provide batch inputs while running the code without any waiting
The text was updated successfully, but these errors were encountered:
Just provide a callback that reads a line directly from the batch input.
from python_runner import PatchedStdinRunner batch_input = "hello\nworld" input_lines = batch_input.splitlines() events = [] def callback(event_type, data): events.append((event_type, data)) if event_type == "input": return input_lines.pop(0) runner = PatchedStdinRunner(callback=callback) runner.run("print(1, input(), 2, input())") for event in events: print(event)
Sorry, something went wrong.
No branches or pull requests
Is there any direct way to provide batch inputs while running the code without any waiting
The text was updated successfully, but these errors were encountered: