Results 1 to 3 of 3

Thread: Viewing "Print" Output Statements in Ice.py

  1. #1
    afcarl is offline Registered User
    Name: Andy Carl
    Organization: Northrop Grumman Corp
    Project: Distributed analysis of air vehicle subsystems
    Join Date
    Jul 2009
    Posts
    39

    Viewing "Print" Output Statements in Ice.py

    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)
    Last edited by afcarl; 05-03-2010 at 06:10 PM.

  2. #2
    afcarl is offline Registered User
    Name: Andy Carl
    Organization: Northrop Grumman Corp
    Project: Distributed analysis of air vehicle subsystems
    Join Date
    Jul 2009
    Posts
    39
    "sys.__stdout__.write( "..." )" does not work either.

  3. #3
    joshmoore is offline Registered User
    Name: Josh Moore
    Organization: Glencoe Software, Inc.
    Project: OMERO, http://trac.openmicroscopy.org.uk/omero
    Join Date
    Feb 2007
    Location
    Germany
    Posts
    115
    Hi Andy,

    my guess would be that once the communicator is initialized:
    Code:
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 01-21-2011, 05:30 AM
  2. Replies: 6
    Last Post: 07-12-2009, 01:44 PM
  3. Replies: 1
    Last Post: 06-09-2009, 10:53 PM
  4. Replies: 1
    Last Post: 01-28-2009, 06:15 AM
  5. Replies: 4
    Last Post: 10-26-2006, 11:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •