Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (anonymous):

Can anyone tell me how to write ostream objects in Python so i can do something like cout << x << " and " << y << endl in Python?Can anyone tell me how to write ostream objects in Python so i can do something like cout << x << " and " << y << endl in Python?@Computer Science

OpenStudy (anonymous):

I'm still waiting for anybody's solution :-D

OpenStudy (anonymous):

print x, 'and', y Don't know python but this seems to work with the ideone.com compiler: http://ideone.com/kDY0e

OpenStudy (anonymous):

If you mean coding an output stream module, you have to use a decorator class to avoid basic errors, like trying to write in cStringIO or the famous Unicode error. Check this example: http://ginstrom.com/scribbles/2007/09/14/encoding-an-output-stream-in-python/ Hopefully, that's what you meant by your question.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!