Hello !!! I am writing an interface to a C library and I am having trouble with one of its functions... It is writing a lot of text to stdout or stderr ( I do not even know that ! ) and I would like to mute that. I tried this trick I found on a website :
#stdout.py import sys,os saveout = sys.stdout fsock = open(os.devnull, 'w') sys.stdout = fsock print 'This message will be logged instead of displayed' sys.stdout = saveout fsock.close() Where the "print" command is replaced by the C function I call. I began to think it may come from the fact I am using Cython instead of Python... Do you know of such a thing, or is it just another one of my mistakes ? ;-) Thanks ! Nathann --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---