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
When calling GAP functions like Print() which print directly to standard I/O, although it works, it doesn't pass through Python's sys.stdout, so it can't be captured by other Python code that captures I/O. In particular, pytest can't correctly capture the output of doctests where this happens.
This might be something to fix in pytest (maybe there is a plugin or option for this but I can't find one). But it might still be better for integration with other Python code if standard I/O passed through the standard Python streams somehow rather than directly to the file descriptor.
The text was updated successfully, but these errors were encountered:
One way might be to direct GAP's stdout to a pipe, and have a thread to read from that pipe (esp. while running any GAP calls) and redirect it to sys.stdout. Using a pipe + thread would be advantageous over just capturing to a variable, so that calling GAP functions that progressively write something to the stream is actually streamed and not just output all at once when the call is completed.
When calling GAP functions like
Print()
which print directly to standard I/O, although it works, it doesn't pass through Python'ssys.stdout
, so it can't be captured by other Python code that captures I/O. In particular, pytest can't correctly capture the output of doctests where this happens.This might be something to fix in pytest (maybe there is a plugin or option for this but I can't find one). But it might still be better for integration with other Python code if standard I/O passed through the standard Python streams somehow rather than directly to the file descriptor.
The text was updated successfully, but these errors were encountered: