← Back to team overview

yade-users team mailing list archive

Re: [Question #667546]: The yade won't print anything until the python script is all finished in slurm command

 

Question #667546 on Yade changed:
https://answers.launchpad.net/yade/+question/667546

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,
just an idea (not tested), would
###
print "whatever"
sys.stdout.flush()
###
help?

Alternatively, you can use a workaround, instead of print, use
sys.stderr.write("whatever\n") # [1]
as this was printed..

Even more workaround, instead of printing, you can open a file and write
to it..

cheers
Jan

[1] https://github.com/yade/trunk/blob/master/core/main/main.py.in#L180

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.