Viewing "Print" Output Statements in Ice.py

afcarlafcarl ✭✭Member Andy CarlOrganization: Northrop Grumman CorpProject: Distributed analysis of air vehicle subsystems ✭✭
How does one enable output of python "print" statements on STDOUT placed in "Ice.py" for diagnostic purposes?
Thanks.

"sys.stdout = sys.__stdout__" does not work.

"print >> sys.__stdout__" does not work either.

"print >> sys.__stderr__" does not work either. ([ python-Bugs-1096310 ] sys.__stdout__ doco isn't discouraging enough)

Comments

  • afcarlafcarl ✭✭ Member Andy CarlOrganization: Northrop Grumman CorpProject: Distributed analysis of air vehicle subsystems ✭✭
    "sys.__stdout__.write( "..." )" does not work either.
  • joshmoorejoshmoore GermanyMember Josh MooreOrganization: Glencoe Software, Inc.Project: OME, http://openmicroscopy.org
    Hi Andy,

    my guess would be that once the communicator is initialized:
    def initialize(args=None, data=None):
        communicator = IcePy.Communicator(args, data)
        return CommunicatorI(communicator)
    
    the C++ runtime redirects the file descriptors (depending on configuration) and so you won't be able to do much in Python land.

    How are you running the Python servers?
    ~J.
Sign In or Register to comment.