-
Couldn't load subscription status.
- Fork 56
Closed
Description
import ansys.fluent.core as pyfluent
solver = pyfluent.launch_fluent(show_gui=True, start_transcript=False)
solver.transcript.start(file_path="a.trn") # write to both file and stdout
solver.transcript.stop()
solver.transcript.start(file_path="a.trn", write_to_interpreter=False) # write to file only
solver.transcript.stop()
solver.transcript.start(file_path="a.trn") # write to file only
We can make it to behave like Python logging module:
import logging
logging.warning("abc") # writes to stdout only
import logging
logging.basicConfig(filename="a.log")
logging.warning("abc") # writes to file only
To write to both file and stdout, the logging module requires additional configuration.
So, in our case, we can do
transcript.start() # write to stdout only
transcript.start(file_path="a.trn") # write to file only
transcript.start(file_path="a.trn", write_to_stdout=True) # write to both file and stdout
Metadata
Metadata
Assignees
Labels
No labels