Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Module: print output going to wrong location. #1596

Closed
linas opened this issue May 7, 2015 · 3 comments
Closed

Python Module: print output going to wrong location. #1596

linas opened this issue May 7, 2015 · 3 comments
Labels

Comments

@linas
Copy link
Member

linas commented May 7, 2015

The cogserver python module redirects some output, but not all print output: for example: start cogserver, telnet localhost 17001 and say print "hello" and the output comes back by telnet session.

But, if instead, you call some python library, and it has print statements in it, then those prints end up on the cogserver console, instead of the telnet console. I'm not sure under what circumstances this happens; for me, it happens when I call (for example)

      rospy.Subscriber("/blender_api/available_gestures",
             AvailableGestures, self.get_gestures_cb)

and the get_gestures_cb has print statements. The problem here is that rospy.Subscriber is listening for messages asynchornoulsy, thus .. well, I don't know. It might explain it if this is not easily reproducible.

@linas
Copy link
Member Author

linas commented Feb 22, 2016

I have hacked around this in some recent pull request. Its a hack .... its a part of pull request #2025 and is located here:
3e6896b#diff-3356f5f6465ff136fe4e302c9702c0a1
This is also a duplicate of opencog/atomspace/issues/629

Although the solution seems to be kind-of hacky, it kind-of works. Thus I am closing this, for now.

@inflector if you understand this issue, and can think of a better solution, let me know.

@inflector
Copy link
Member

@linas I'll look into solving this "the right way", but it's not an area I'm already familiar with so I don't yet know what that means.

@linas
Copy link
Member Author

linas commented Feb 23, 2016

Thanks. I'm not sure what priority this needs to be, but my solution did seem to be a work-around, rather than a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants