On Apr 14, 10:08 am, Jeroen Demeyer <jdeme...@cage.ugent.be> wrote:
> Hello sage-devel,
>
> I wrote a program called "ptyrun", which runs an arbitrary program in a
> pseudo-tty.  I personally found it useful, so maybe somebody else will
> find it useful also.  
> I personally found this useful in the following
> setting:
>
> $ ./sage -t -verbose devel/sage/sage | tee test.log
>
> Since the doctesting process (i.e. Python) does buffering, the output
> will not be fluent. Instead, if you do
>
> $ ptyrun "./sage -t -verbose devel/sage/sage" | tee test.log
>
> the output will appear line-by-line, just as if the "tee test.log"
> wasn't there.
>
Nice program. This will be very useful when doing huge computations
again of which I want the output logged and also want to check on the
progress from time to time.
Note for the non linux users. To deal with this particular use case we
could also use any of the solutions as found on
http://stackoverflow.com/questions/107705/python-output-buffering
The environment variable solution will work out of the box with sage
also. Maybe -u mentioned there would also be a good command line
option for sage.

> Jeroen.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to