AW: [C++-sig] Stdout from c++
Oliver Walczak
oliver.walczak at momatec.de
Wed Nov 5 16:54:12 CET 2003
Dear Stefan,
Writing to the idle console from a dll certainly IS a task of python
programming under c++. And i can't really believe that anyone writing .pyd's
needs to reconnect std.cout with it's own streambuf class by hand when
python provides modules to create a webserver in three rows of code, do you?
Are you really shure that there is no python api functionality for this?
Thanx for your advice anyway!
Oliver
-----Ursprüngliche Nachricht-----
Von: c++-sig-bounces at python.org [mailto:c++-sig-bounces at python.org] Im
Auftrag von Stefan Seefeld
Gesendet: Mittwoch, 5. November 2003 16:42
An: Development of Python/C++ integration
Betreff: Re: [C++-sig] Stdout from c++
Oliver Walczak wrote:
> Dear list,
> I'm quite new to programming c++ extensions for python (not to the c++
> Language itself) and i'm wondering what might be the simplest way to
> make simple string output to sys.stdout from the c++ api. Can anybody
> give me a hint? I used iostream and cout until now and this works well
> in the command shell, but not running the idle console under windows.
short answer: get a better OS.
long answer: if the OS has the concept of an output stream, and its
(buggy) std::cout implementation doesn't connect to it,
write your own streambuf that writes to this output
stream, then redirect std::cout to use your streambuf.
But that has nothing to do with python programming in C++...
Hope this helps,
Stefan
_______________________________________________
C++-sig mailing list
C++-sig at python.org
http://mail.python.org/mailman/listinfo/c++-sig
More information about the Cplusplus-sig
mailing list