def writeln(message='', endl='\n'): from petsc4py.PETSc import Sys Sys.syncPrint(message, endl=endl, flush=True)